10% simple-debug

Code Review | Simple Debug

WordPress plugin Simple Debug scored10%from 54 tests.

About plugin

  • Plugin page: simple-debug
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.5
  • WordPress version: 6.3.1
  • First release: Nov 2, 2012
  • Latest release: Jan 11, 2013
  • Number of updates: 27
  • Update frequency: every 2.6 days
  • Top authors: ChrisHurst (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,376 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/simple-debug/simple-debug-plugin.php+64
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.68MB] [CPU: ▼57.09ms] Passed 4 tests

Analyzing server-side resources used by Simple Debug
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.157.30 ▼32.96
Dashboard /wp-admin2.33 ▼0.977.79 ▼44.03
Posts /wp-admin/edit.php2.34 ▼1.038.68 ▼49.21
Add New Post /wp-admin/post-new.php2.34 ▼3.569.33 ▼102.16
Media Library /wp-admin/upload.php2.34 ▼0.907.58 ▼31.28
Simple Debug /wp-admin/options-general.php?page=simple-debug-settings2.347.57

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Simple Debug: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.451.62 ▼0.0939.74 ▼0.04
Dashboard /wp-admin2,199 ▲195.61 ▼0.0089.85 ▼4.0541.79 ▼3.25
Posts /wp-admin/edit.php2,101 ▲11.97 ▼0.1139.15 ▼0.8839.02 ▲1.18
Add New Post /wp-admin/post-new.php1,530 ▲422.22 ▼0.87658.69 ▼3.3355.04 ▼3.20
Media Library /wp-admin/upload.php1,398 ▼24.17 ▲0.0597.77 ▼5.9544.46 ▼2.14
Simple Debug /wp-admin/options-general.php?page=simple-debug-settings1,2344.77120.3242.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/simple-debug/simple-debug-plugin.php+64
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-debug-settings
    • > Notice in wp-content/plugins/simple-debug/simple-debug-plugin.php+80
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-debug-settings
    • > Notice in wp-content/plugins/simple-debug/simple-debug-plugin.php+80
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=simple-debug-settings
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP 50% 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
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/simple-debug/simple-debug-log-table.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-debug/simple-debug-log-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/simple-debug/simple-debug-loader.php:15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-debug/simple-debug-log-table.php on line 4

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 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (This website is badly in need of optimization, one function call takes almost 10 seconds!), #2 (After using the plugin to locate the slow function, our developers have resolved the issue, now the site loads in under one second!), #3 (Plugin settings screen), #4 (Example output for the display error log function), #5 (Example output for the display PHP.ini variables function), #6 (Example output for the optimize DB function), #7 (Example output for the display MySQL DB performance variables function.)
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

simple-debug/simple-debug-loader.php 92% from 13 tests

The principal PHP file in "Simple Debug" v. 1.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-debug.php" instead of "simple-debug-loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,157 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP68082421,157

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity23.80
▷ Minimum class complexity8.00
▷ Maximum class complexity40.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods67
▷ Static methods00.00%
▷ Public methods5480.60%
▷ Protected methods00.00%
▷ Private methods1319.40%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin