84% cron-logger

Code Review | Cron Logger

WordPress plugin Cron Logger scored 84% from 54 tests.

About plugin

  • Plugin page: cron-logger
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8
  • WordPress version: 5.8.1
  • First release: Dec 4, 2017
  • Latest release: Aug 23, 2021
  • Number of updates: 13
  • Update frequency: every 104.8 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 6,980 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.01MB] [CPU: ▼143.41ms] Passed 4 tests

Server-side resources used by Cron Logger
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0235.17 ▼4.00
Dashboard /wp-admin3.08 ▲0.0242.75 ▲0.42
Posts /wp-admin/edit.php3.13 ▲0.0245.48 ▼4.00
Add New Post /wp-admin/post-new.php5.44 ▲0.0195.08 ▼557.22
Media Library /wp-admin/upload.php3.02 ▲0.0133.55 ▼8.42
Cron Logs /wp-admin/tools.php?page=cron-logs2.9932.48

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 23 new files
Database: 1 new table, no new options
New tables
wp_cron_logs

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 /3,684 ▲8915.82 ▲0.338.15 ▲0.3045.21 ▼12.34
Dashboard /wp-admin2,978 ▲476.08 ▼0.11138.84 ▼21.84116.90 ▼1.90
Posts /wp-admin/edit.php2,744 ▲52.68 ▼0.0171.80 ▲6.1591.96 ▲0.96
Add New Post /wp-admin/post-new.php1,686 ▲18616.24 ▼2.54380.43 ▲13.12112.18 ▲0.57
Media Library /wp-admin/upload.php1,812 ▲25.01 ▼0.01159.05 ▼2.35128.25 ▲3.65
Cron Logs /wp-admin/tools.php?page=cron-logs1,1892.2465.5684.65

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 does not fully uninstall, leaving 1 table in the database
    • wp_cron_logs

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
  • 1× 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

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: log, wp-cron, debug, cron, tool

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

The entry point to "Cron Logger" version 1.1.0 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,119 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP172463611,052
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.34
Average class complexity10.83
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods81
▷ Static methods1923.46%
▷ Public methods7997.53%
▷ Protected methods00.00%
▷ Private methods22.47%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.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