78% debug-toolkit

Code Review | Debug Toolkit

WordPress plugin Debug Toolkit scored78%from 54 tests.

About plugin

  • Plugin page: debug-toolkit
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2019
  • Latest release: Mar 11, 2019
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: hellofromTonya (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

100+ active /7,289 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.69MB] [CPU: ▼5.88ms] Passed 4 tests

An overview of server-side resources used by Debug Toolkit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.17 ▲0.7146.58 ▲3.73
Dashboard /wp-admin4.01 ▲0.6651.89 ▼12.16
Posts /wp-admin/edit.php4.12 ▲0.7652.47 ▲1.98
Add New Post /wp-admin/post-new.php6.59 ▲0.7085.78 ▼16.25
Media Library /wp-admin/upload.php3.93 ▲0.7039.24 ▲2.90

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Debug Toolkit
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.19 ▼0.971.70 ▼0.0742.19 ▼1.52
Dashboard /wp-admin2,214 ▲265.79 ▼0.1299.14 ▼12.9338.07 ▼9.06
Posts /wp-admin/edit.php2,100 ▲111.99 ▼0.0136.36 ▲1.1635.59 ▼1.18
Add New Post /wp-admin/post-new.php1,521 ▲717.57 ▼0.01661.91 ▼19.0965.48 ▲11.77
Media Library /wp-admin/upload.php1,399 ▲114.21 ▼0.0499.63 ▲1.5442.65 ▼0.89

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/debug-toolkit/vendor/filp/whoops/src/Whoops/Resources/views/frames_description.html.php
    • > /wp-content/plugins/debug-toolkit/vendor/filp/whoops/src/Whoops/Resources/views/frame_code.html.php
    • > /wp-content/plugins/debug-toolkit/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php
    • > /wp-content/plugins/debug-toolkit/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php
  • 247× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/debug-toolkit/vendor/psr/log/Psr/Log/NullLogger.php:13
    • > PHP Notice
      Undefined variable: frames in wp-content/plugins/debug-toolkit/vendor/filp/whoops/src/Whoops/Resources/views/frames_description.html.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Renderer\\TextRenderer' not found in wp-content/plugins/debug-toolkit/vendor/kint-php/kint/src/Renderer/CliRenderer.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/debug-toolkit/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Parser\\Plugin' not found in wp-content/plugins/debug-toolkit/vendor/kint-php/kint/src/Parser/ColorPlugin.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/debug-toolkit/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php:4
    • > PHP Notice
      Undefined variable: message in wp-content/plugins/debug-toolkit/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php on line 77
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/debug-toolkit/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/debug-toolkit/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/debug-toolkit/vendor/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php:22

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (The results of running `trace()`.) image not found
The official readme.txt might help

debug-toolkit/debug-toolkit.php 92% from 13 tests

The main PHP file in "Debug Toolkit" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin22,511 lines of code in 325 files:
LanguageFilesBlank linesComment linesLines of code
PHP2944,0956,59820,786
JSON800839
CSS6867514
JavaScript84332176
Markdown7620156
XML23040

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity10.05
▷ Minimum class complexity1.00
▷ Maximum class complexity142.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces29
Interfaces11
Traits3
Classes251
▷ Abstract classes103.98%
▷ Concrete classes24196.02%
▷ Final classes31.24%
Methods1,014
▷ Static methods20320.02%
▷ Public methods85884.62%
▷ Protected methods949.27%
▷ Private methods626.11%
Functions114
▷ Named functions7263.16%
▷ Anonymous functions4236.84%
Constants89
▷ Global constants1011.24%
▷ Class constants7988.76%
▷ Public constants79100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.61MB with 0.44MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png206.22KB66.29KB▼ 67.85%
screenshot-2.png116.29KB29.51KB▼ 74.62%
screenshot-4.png147.57KB45.76KB▼ 68.99%
screenshot-3.png154.75KB38.69KB▼ 75.00%