84% wp-cron-cleaner

Code Review | WP Cron Cleaner

WordPress plugin WP Cron Cleaner scored84%from 54 tests.

About plugin

  • Plugin page: wp-cron-cleaner
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2016
  • Latest release: Apr 10, 2023
  • Number of updates: 37
  • Update frequency: every 69.5 days
  • Top authors: symptote (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

600+ active /12,029 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.83ms] Passed 4 tests

A check of server-side resources used by WP Cron Cleaner
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.76 ▼2.95
Dashboard /wp-admin3.34 ▼0.0150.83 ▼16.58
Posts /wp-admin/edit.php3.39 ▲0.0350.44 ▼2.58
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.88 ▼1.21
Media Library /wp-admin/upload.php3.26 ▲0.0338.07 ▲0.98
WP Cron Cleaner /wp-admin/tools.php?page=wp_cron_cleaner3.2836.61

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Cron Cleaner
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.41 ▲0.011.96 ▲0.1943.18 ▲3.74
Dashboard /wp-admin2,202 ▲225.60 ▼0.1087.67 ▼12.4540.25 ▼2.09
Posts /wp-admin/edit.php2,104 ▲12.06 ▲0.0134.70 ▼8.0235.30 ▲0.38
Add New Post /wp-admin/post-new.php1,548 ▲1723.17 ▼0.31644.94 ▼45.6358.80 ▲4.55
Media Library /wp-admin/upload.php1,401 ▲74.26 ▲0.03101.17 ▲0.8545.22 ▼0.54
WP Cron Cleaner /wp-admin/tools.php?page=wp_cron_cleaner1,4682.5954.5437.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WPCC_PLUGIN_VERSION - assumed 'WPCC_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-cron-cleaner/includes/sidebar.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-cron-cleaner/includes/premium_page.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/wp-cron-cleaner/includes/class_clean_cron.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-cron-cleaner/includes/sidebar.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 your attention:
  • Screenshots: Please add images for these screenshots: #1 (View and clean scheduled tasks (Free version)), #2 (Detect orphan tasks, plugins tasks, themes tasks and WP tasks (Pro version))
  • Tags: Please reduce the number of tags, currently 31 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-cron-cleaner/wp-cron-cleaner.php Passed 13 tests

The primary PHP file in "WP Cron Cleaner" version 1.0.2 is used by WordPress to initiate all plugin functionality
73 characters long description:
View the list of all your cron scheduled tasks, then clean what you want.

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
No dangerous file extensions were detected821 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP663118434
CSS1443330
JavaScript17157

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 0.19MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/check_ok.png0.54KB0.46KB▼ 15.19%
images/warning.png0.70KB0.93KB0.00%
images/features.png3.80KB2.42KB▼ 36.34%
screenshot-1.png81.95KB29.42KB▼ 64.11%
images/notice.png0.56KB0.55KB▼ 2.10%