84% clear-debuglog-cron

Code Review | Clear Debug.log Cron

WordPress plugin Clear Debug.log Cron scored 84% from 54 tests.

About plugin

  • Plugin page: clear-debuglog-cron
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 5.8.1
  • First release: Oct 12, 2012
  • Latest release: Oct 12, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: salocined (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,060 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.00MB] [CPU: ▼143.98ms] Passed 4 tests

Analyzing server-side resources used by Clear Debug.log Cron
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.21 ▲13.87
Dashboard /wp-admin3.06 ▲0.0135.54 ▼12.61
Posts /wp-admin/edit.php3.12 ▲0.0147.84 ▲2.82
Add New Post /wp-admin/post-new.php5.42 ▼0.0196.00 ▼562.74
Media Library /wp-admin/upload.php3.01 ▲0.0132.87 ▼3.37

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options
debug_cron

Browser metrics Passed 4 tests

Checking browser requirements for Clear Debug.log Cron
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.01 ▲0.5510.57 ▼0.4449.01 ▼2.17
Dashboard /wp-admin2,973 ▲395.89 ▼0.11136.78 ▼18.84112.94 ▼4.44
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0073.53 ▲1.54104.06 ▲6.64
Add New Post /wp-admin/post-new.php1,683 ▼018.77 ▼0.04390.46 ▲4.21119.45 ▲7.58
Media Library /wp-admin/upload.php1,810 ▲35.02 ▲0.02150.27 ▼18.97125.33 ▼3.58

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • debug_cron

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clear-debuglog-cron/cleardebug.php:11

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
The official readme.txt might help

clear-debuglog-cron/cleardebug.php 92% from 13 tests

The main PHP file in "Clear Debug.log Cron" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("clear-debuglog-cron.php" instead of "cleardebug.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected18 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1101018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin