74% action-scheduler

Code Review | Action Scheduler

WordPress plugin Action Scheduler scored74%from 54 tests.

About plugin

  • Plugin page: action-scheduler
  • Plugin version: 3.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Jul 14, 2020
  • Latest release: Nov 20, 2023
  • Number of updates: 25
  • Update frequency: every 49.0 days
  • Top authors: sadowski (44%)royho (16%)barry.hughes (16%)obliviousharmony (12%)wpmuguru (12%)

Code review

54 tests

User reviews

7 reviews

Install metrics

7,000+ active /236,633 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲1.04MB] [CPU: ▲2.36ms] Passed 4 tests

Analyzing server-side resources used by Action Scheduler
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.53 ▲1.0758.23 ▲18.06
Dashboard /wp-admin4.36 ▲1.0156.97 ▼7.90
Posts /wp-admin/edit.php4.41 ▲1.0557.33 ▲6.21
Add New Post /wp-admin/post-new.php6.94 ▲1.0595.58 ▼0.86
Media Library /wp-admin/upload.php4.28 ▲1.0548.92 ▲11.97
Scheduled Actions /wp-admin/tools.php?page=action-scheduler4.4552.98

Server storage [IO: ▲0.49MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 99 new files
Database: 4 new tables, 9 new options
New tables
wp_actionscheduler_logs
wp_actionscheduler_actions
wp_actionscheduler_claims
wp_actionscheduler_groups
New WordPress options
can_compress_scripts
schema-ActionScheduler_LoggerSchema
widget_theysaidso_widget
theysaidso_admin_options
action_scheduler_hybrid_store_demarkation
widget_recent-posts
schema-ActionScheduler_StoreSchema
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Action Scheduler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4714.25 ▼0.031.58 ▼0.0341.07 ▲2.73
Dashboard /wp-admin2,199 ▲215.63 ▼0.0393.52 ▼17.3042.78 ▼1.93
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0635.48 ▼6.4933.89 ▼2.07
Add New Post /wp-admin/post-new.php1,529 ▲323.61 ▲0.33703.13 ▲105.1454.31 ▲6.83
Media Library /wp-admin/upload.php1,398 ▲44.22 ▲0.0494.60 ▼3.2142.36 ▲1.40
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2521.8227.0132.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_actionscheduler_claims
    • wp_actionscheduler_actions
    • wp_actionscheduler_logs
    • wp_actionscheduler_groups
  • Zombie WordPress options detected upon uninstall: 9 options
    • schema-ActionScheduler_LoggerSchema
    • db_upgraded
    • action_scheduler_hybrid_store_demarkation
    • widget_recent-comments
    • schema-ActionScheduler_StoreSchema
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 43× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Action_Scheduler\\Migration\\ActionMigrator' not found in wp-content/plugins/action-scheduler/classes/migration/DryRun_ActionMigrator.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_AdminView_Deprecated' not found in wp-content/plugins/action-scheduler/classes/ActionScheduler_AdminView.php:7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Action' not found in wp-content/plugins/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/action-scheduler/lib/cron-expression/CronExpression_HoursField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Clean_Command.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_SimpleSchedule' not found in wp-content/plugins/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php:6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: cron, scheduler

action-scheduler/action-scheduler.php Passed 13 tests

The main PHP script in "Action Scheduler" version 3.7.0 is automatically included on every request by WordPress
57 characters long description:
A robust scheduling library for use in WordPress plugins.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin7,195 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
PHP911,7595,6537,100
Markdown237090
JSON1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.61
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces4
Interfaces3
Traits0
Classes80
▷ Abstract classes1518.75%
▷ Concrete classes6581.25%
▷ Final classes00.00%
Methods643
▷ Static methods8112.60%
▷ Public methods47273.41%
▷ Protected methods13921.62%
▷ Private methods324.98%
Functions29
▷ Named functions1862.07%
▷ Anonymous functions1137.93%
Constants33
▷ Global constants00.00%
▷ Class constants33100.00%
▷ Public constants33100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin