83% taylors-debug-toggle

Code Review | Taylor's Debug Toggle

WordPress plugin Taylor's Debug Toggle scored83%from 54 tests.

About plugin

  • Plugin page: taylors-debug-toggle
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 8, 2015
  • Latest release: Mar 8, 2015
  • Number of updates: 8
  • Update frequency: every 29.9 days
  • Top authors: taylor.mitchellstjoseph (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /875 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Taylor's Debug Toggle
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.36 ▼0.55
Dashboard /wp-admin3.31 ▲0.0147.80 ▼2.49
Posts /wp-admin/edit.php3.37 ▲0.0146.72 ▼3.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.50 ▼7.18
Media Library /wp-admin/upload.php3.24 ▲0.0134.59 ▲0.38

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Taylor's Debug Toggle
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.19 ▼1.191.78 ▲0.0044.50 ▼8.31
Dashboard /wp-admin2,220 ▲384.88 ▼1.01111.12 ▲6.8342.53 ▼3.46
Posts /wp-admin/edit.php2,106 ▲172.00 ▼0.0636.08 ▲1.7332.71 ▼1.75
Add New Post /wp-admin/post-new.php1,524 ▼1017.82 ▼5.51668.80 ▼16.6450.76 ▼8.61
Media Library /wp-admin/upload.php1,405 ▲234.20 ▼0.0592.95 ▼14.9441.37 ▼0.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/taylors-debug-toggle/plugin.php:77

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed:
  • Requires at least: Version format is invalid
You can look at the official readme.txt

taylors-debug-toggle/plugin.php 85% from 13 tests

The primary PHP file in "Taylor's Debug Toggle" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("taylors-debug-toggle.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin59 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113959

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity4.00
▷ Minimum method complexity2.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin