90% debug-switch

Code Review | Debug Switch

WordPress plugin Debug Switch scored90%from 54 tests.

About plugin

  • Plugin page: debug-switch
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 22, 2022
  • Latest release: Aug 19, 2023
  • Number of updates: 4
  • Update frequency: every 128.7 days
  • Top authors: bhadaway (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /275 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Server-side resources used by Debug Switch
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.60 ▼1.58
Dashboard /wp-admin3.32 ▲0.0159.28 ▲6.10
Posts /wp-admin/edit.php3.37 ▲0.0150.75 ▼0.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.56 ▼8.35
Media Library /wp-admin/upload.php3.24 ▲0.0137.65 ▲5.23
PHP Info /wp-admin/tools.php?page=php-info3.7155.82

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Debug Switch: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.17 ▼0.231.75 ▼0.2143.43 ▼0.64
Dashboard /wp-admin2,211 ▲375.62 ▲0.0187.13 ▼12.5044.46 ▲0.99
Posts /wp-admin/edit.php2,113 ▲132.00 ▼0.0434.85 ▼2.6935.00 ▼1.41
Add New Post /wp-admin/post-new.php1,532 ▲423.10 ▲0.02638.38 ▼55.6655.76 ▼8.08
Media Library /wp-admin/upload.php1,407 ▲74.17 ▼0.02102.24 ▲0.4848.43 ▲5.37
PHP Info /wp-admin/tools.php?page=php-info6,2091.6730.5577.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: errors, info, debug, php

debug-switch/debug-switch.php Passed 13 tests

This is the main PHP file of "Debug Switch" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
98 characters long description:
The fastest and easiest way to switch debug mode on/off and view PHP info directly from the admin.

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 detected68 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP173668

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
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 files were detected