84% cron-logger

Code Review | Cron Logger

WordPress plugin Cron Logger scored84%from 54 tests.

About plugin

  • Plugin page: cron-logger
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 4, 2017
  • Latest release: Jul 11, 2023
  • Number of updates: 20
  • Update frequency: every 102.5 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active /21,494 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.17MB] [CPU: ▼7.07ms] Passed 4 tests

Server-side resources used by Cron Logger
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2046.19 ▲4.62
Dashboard /wp-admin3.52 ▲0.1852.54 ▼10.55
Posts /wp-admin/edit.php3.58 ▲0.2251.24 ▲1.70
Add New Post /wp-admin/post-new.php6.04 ▲0.1684.62 ▼23.31
Media Library /wp-admin/upload.php3.39 ▲0.1638.57 ▲3.89
Cron Logs /wp-admin/tools.php?page=cron-logs3.3534.15

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 26 new files
Database: 1 new table, 7 new options
New tables
wp_cron_logs
New WordPress options
widget_recent-posts
can_compress_scripts
_cron_logger_version
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Cron Logger
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.30 ▼0.301.83 ▲0.1545.33 ▲3.96
Dashboard /wp-admin2,199 ▲225.57 ▼0.1395.30 ▲10.5341.37 ▼0.70
Posts /wp-admin/edit.php2,101 ▲42.00 ▲0.0535.72 ▲1.6433.05 ▼2.39
Add New Post /wp-admin/post-new.php1,529 ▼123.52 ▲0.40659.26 ▼6.1558.69 ▲7.72
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.0494.26 ▼14.0940.31 ▼4.38
Cron Logs /wp-admin/tools.php?page=cron-logs8491.6722.5624.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CronLogger\\Components\\plugin_dir_path() in wp-content/plugins/cron-logger/classes/Components/Plugin.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'CronLogger\\Components\\Update' not found in wp-content/plugins/cron-logger/classes/Updates.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: debug, cron, wp-cron, tool, log

cron-logger/plugin.php 92% from 13 tests

The entry point to "Cron Logger" version 1.2.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cron-logger.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,178 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP202754841,111
PO File1161662
JSON1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.14
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes14
▷ Abstract classes214.29%
▷ Concrete classes1285.71%
▷ Final classes00.00%
Methods90
▷ Static methods2022.22%
▷ Public methods8796.67%
▷ Protected methods00.00%
▷ Private methods33.33%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin