83% simple-calendar-acf

Code Review | Simple Calendar - Advanced Custom Fields

WordPress plugin Simple Calendar - Advanced Custom Fields scored83%from 54 tests.

About plugin

  • Plugin page: simple-calendar-acf
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 11, 2015
  • Latest release: Aug 26, 2023
  • Number of updates: 12
  • Update frequency: every 237.1 days
  • Top authors: rosinghal (41.67%)simplecalendar (33.33%)pderksen (25%)nekojira (25%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /6,974 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.61ms] Passed 4 tests

Server-side resources used by Simple Calendar - Advanced Custom Fields
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.22 ▼4.72
Dashboard /wp-admin3.31 ▲0.0147.10 ▼4.29
Posts /wp-admin/edit.php3.36 ▲0.0045.61 ▼3.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.81 ▼5.46
Media Library /wp-admin/upload.php3.23 ▲0.0034.97 ▼0.43

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Simple Calendar - Advanced Custom Fields
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.28 ▼0.091.71 ▼0.0244.10 ▼3.52
Dashboard /wp-admin2,198 ▲185.54 ▼0.1096.54 ▼6.0543.01 ▼0.31
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0533.88 ▼1.1938.13 ▼3.24
Add New Post /wp-admin/post-new.php1,529 ▲322.94 ▼0.04657.31 ▼16.8360.98 ▲5.01
Media Library /wp-admin/upload.php1,403 ▲34.26 ▲0.10103.36 ▲0.2745.91 ▲1.37

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SimpleCalendar\\add_action() in wp-content/plugins/simple-calendar-acf/includes/add-on-acf.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt is a good inspiration

simple-calendar-acf/simple-calendar-acf.php 85% from 13 tests

"Simple Calendar - Advanced Custom Fields" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("i18n/")
  • Domain Path: Prefix the domain path with a forward slash character ("/i18n/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin255 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP450172255

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.00
▷ Minimum class complexity2.00
▷ Maximum class complexity12.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected