68% kl-debug

Code Review | KL Debug

WordPress plugin KL Debug scored68%from 54 tests.

About plugin

  • Plugin page: kl-debug
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Feb 25, 2020
  • Latest release: Jun 24, 2022
  • Number of updates: 16
  • Update frequency: every 53.1 days
  • Top authors: krealab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /956 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▲0.28ms] Passed 4 tests

Analyzing server-side resources used by KL Debug
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.26 ▲0.5256.80 ▲11.45
Dashboard /wp-admin4.10 ▲0.4658.19 ▼9.95
Posts /wp-admin/edit.php4.15 ▲0.4759.96 ▲11.29
Add New Post /wp-admin/post-new.php6.62 ▲0.4797.03 ▼7.63
Media Library /wp-admin/upload.php3.96 ▲0.4746.44 ▲7.43
KL Debug /wp-admin/tools.php?page=kl-debug-settings3.9438.22

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 280 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

KL Debug: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11613.47 ▼0.9010.10 ▲8.4938.65 ▼5.28
Dashboard /wp-admin2,202 ▲255.63 ▼0.0691.09 ▼0.3237.32 ▼4.18
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0340.52 ▼1.6435.52 ▼0.66
Add New Post /wp-admin/post-new.php1,548 ▼023.71 ▲0.27686.65 ▲67.5949.46 ▼12.99
Media Library /wp-admin/upload.php1,401 ▲44.14 ▼0.06107.52 ▲9.9245.43 ▼0.64
KL Debug /wp-admin/tools.php?page=kl-debug-settings9492.3639.4943.16

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/kl-debug/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php
    • > /wp-content/plugins/kl-debug/views/front/popup-click-header.php
    • > /wp-content/plugins/kl-debug/vendor/filp/whoops/src/Whoops/Resources/views/frames_description.html.php
    • > /wp-content/plugins/kl-debug/vendor/micropackage/requirements/tests/bootstrap.php
    • > /wp-content/plugins/kl-debug/vendor/filp/whoops/src/Whoops/Resources/views/frame_code.html.php
    • > /wp-content/plugins/kl-debug/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php
  • 108× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: tpl in wp-content/plugins/kl-debug/vendor/filp/whoops/src/Whoops/Resources/views/panel_left.html.php on line 2
    • > PHP Fatal error
      Uncaught Error: Interface 'Stringable' not found in wp-content/plugins/kl-debug/vendor/symfony/polyfill-php80/PhpToken.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/kl-debug/vendor/micropackage/requirements/tests/Checker/test-theme.php:18
    • > PHP Warning
      implode(): Invalid arguments passed in wp-content/plugins/kl-debug/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php on line 77
    • > PHP Notice
      Undefined variable: tpl in wp-content/plugins/kl-debug/vendor/filp/whoops/src/Whoops/Resources/views/panel_details.html.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' not found in wp-content/plugins/kl-debug/vendor/symfony/var-dumper/Caster/FrameStub.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Cloner\\Stub' not found in wp-content/plugins/kl-debug/vendor/symfony/var-dumper/Caster/ConstStub.php:21
    • > PHP Fatal error
      Uncaught Error: Call to a member function escape() on null in wp-content/plugins/kl-debug/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php:88
    • > PHP Notice
      Undefined variable: handlers in wp-content/plugins/kl-debug/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php on line 35
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Caster\\ConstStub' not found in wp-content/plugins/kl-debug/vendor/symfony/var-dumper/Caster/ImgStub.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: developer, toolbar, debug

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

Analyzing the main PHP file in "KL Debug" version 1.0.5
The following require your attention:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
These items require your attention
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/kl-debug/vendor/bin/var-dump-server.bat
27,094 lines of code in 242 files:
LanguageFilesBlank linesComment linesLines of code
PHP1853,0825,21215,301
SVG30129,061
JSON1100912
CSS1514762906
Markdown132070409
JavaScript73534159
Bourne Shell12111120
PO File23950119
XML24356
YAML210047
DOS Batch1004

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity12.73
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces36
Interfaces11
Traits3
Classes131
▷ Abstract classes64.58%
▷ Concrete classes12595.42%
▷ Final classes118.80%
Methods804
▷ Static methods20825.87%
▷ Public methods71789.18%
▷ Protected methods354.35%
▷ Private methods526.47%
Functions131
▷ Named functions10277.86%
▷ Anonymous functions2922.14%
Constants99
▷ Global constants1313.13%
▷ Class constants8686.87%
▷ Public constants6676.74%

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
No PNG images were found in this plugin