90% enable-wp-debug-toggle

Code Review | WP_DEBUG Toggle

WordPress plugin WP_DEBUG Toggle scored90%from 54 tests.

About plugin

  • Plugin page: enable-wp-debug-t...
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 19, 2023
  • Latest release: Feb 8, 2023
  • Number of updates: 15
  • Update frequency: every 2.7 days
  • Top authors: pluginsclub (80%)stefanpejcic (26.67%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /460 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.47ms] Passed 4 tests

A check of server-side resources used by WP_DEBUG Toggle
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.74 ▲1.84
Dashboard /wp-admin3.31 ▲0.0150.95 ▼4.91
Posts /wp-admin/edit.php3.36 ▲0.0150.20 ▼1.92
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.04 ▼8.34
Media Library /wp-admin/upload.php3.24 ▲0.0137.66 ▲1.31

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP_DEBUG Toggle
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.73 ▲0.171.90 ▲0.1745.15 ▲1.16
Dashboard /wp-admin2,216 ▲365.52 ▼0.1285.52 ▼4.5741.36 ▲2.56
Posts /wp-admin/edit.php2,115 ▲152.01 ▼0.1036.57 ▼1.7735.78 ▼0.20
Add New Post /wp-admin/post-new.php1,540 ▲1223.13 ▼0.08673.69 ▼13.4853.42 ▼13.02
Media Library /wp-admin/upload.php1,421 ▲244.40 ▲0.12101.09 ▼4.7246.19 ▲0.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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: disable wpdebug, debug, enable wp debug, wp_debug, error_log

enable-wp-debug-toggle/wp-debug-toggle.php 92% from 13 tests

"WP_DEBUG Toggle" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("enable-wp-debug-toggle.php" instead of "wp-debug-toggle.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
No dangerous file extensions were detected162 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP2242993
JavaScript20736
CSS32333

PHP code Passed 2 tests

This is a very shot 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.23
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin