79% cronjob-scheduler

Code Review | Cronjob Scheduler

WordPress plugin Cronjob Scheduler scored79%from 54 tests.

About plugin

  • Plugin page: cronjob-scheduler
  • Plugin version: 1.40.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.4.1
  • WordPress version: 6.3.1
  • First release: May 16, 2014
  • Latest release: May 26, 2020
  • Number of updates: 38
  • Update frequency: every 58.0 days
  • Top authors: chrispage1 (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

2,000+ active /38,664 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.19ms] Passed 4 tests

An overview of server-side resources used by Cronjob Scheduler
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0937.51 ▼14.42
Dashboard /wp-admin3.40 ▲0.0948.18 ▲0.51
Posts /wp-admin/edit.php3.51 ▲0.1548.58 ▲1.15
Add New Post /wp-admin/post-new.php5.98 ▲0.0994.93 ▲2.96
Media Library /wp-admin/upload.php3.32 ▲0.0939.76 ▲0.02
Cronjob Scheduler /wp-admin/options-general.php?page=cronjob_scheduler3.3041.39

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Cronjob Scheduler
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.14 ▼1.131.64 ▼0.2050.31 ▲7.75
Dashboard /wp-admin2,210 ▲255.85 ▼0.01105.15 ▼13.6542.47 ▲0.81
Posts /wp-admin/edit.php2,093 ▲11.97 ▼0.0453.14 ▲14.9137.07 ▲2.86
Add New Post /wp-admin/post-new.php1,538 ▲1923.18 ▼0.04672.26 ▲7.4052.39 ▼24.68
Media Library /wp-admin/upload.php1,392 ▲44.19 ▲0.0199.89 ▼5.9445.14 ▲0.19
Cronjob Scheduler /wp-admin/options-general.php?page=cronjob_scheduler9712.0332.4142.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cronjob_scheduler
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cronjob_scheduler
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cronjob_scheduler
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cronjob_scheduler
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

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
Please fix the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/cronjob-scheduler/views/right_column.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cronjob-scheduler/lib/cronjobs.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/cronjob-scheduler/views/plugin_misconfigured.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cronjob-scheduler/cronjobs.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'chrispage1\\lib\\Commons' not found in wp-content/plugins/cronjob-scheduler/lib/CronjobScheduler.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cronjob-scheduler/cronjobs.php:16
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cronjob-scheduler/views/admin_page.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: scheduler, task, cronjob, cron, automation

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

Analyzing the main PHP file in "Cronjob Scheduler" version 1.40.1
58 characters long description:
Plugin to manage, edit and remove WordPress cron job tasks

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected634 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8234341634

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity32.00
▷ Minimum class complexity19.00
▷ Maximum class complexity45.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2890.32%
▷ Protected methods13.23%
▷ Private methods26.45%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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 images were found in this plugin