74% sm-debug-bar

Code Review | SM Debug Bar

WordPress plugin SM Debug Bar scored74%from 54 tests.

About plugin

  • Plugin page: sm-debug-bar
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.3
  • WordPress version: 6.3.1
  • First release: May 13, 2011
  • Latest release: Dec 30, 2011
  • Number of updates: 23
  • Update frequency: every 10.1 days
  • Top authors: sethmatics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,978 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.85MB] [CPU: ▼34.27ms] Passed 4 tests

An overview of server-side resources used by SM Debug Bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0932.24 ▼5.60
Dashboard /wp-admin3.10 ▼0.2422.93 ▼39.24
Posts /wp-admin/edit.php3.10 ▼0.2620.98 ▼27.52
Add New Post /wp-admin/post-new.php3.10 ▼2.7923.83 ▼59.95
Media Library /wp-admin/upload.php3.10 ▼0.1322.61 ▼10.36

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 9 new options
New WordPress options
sm_dbug_bar__admin_panel_vars
widget_theysaidso_widget
1
sm_dbug_bar__height
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

SM Debug Bar: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲21713.65 ▼0.886.99 ▲5.2744.28 ▲7.01
Dashboard /wp-admin2,320 ▲1404.95 ▼0.7295.68 ▲5.9837.82 ▼2.16
Posts /wp-admin/edit.php2,260 ▲1602.55 ▲0.5242.13 ▲4.8830.53 ▼6.14
Add New Post /wp-admin/post-new.php1,654 ▲12818.78 ▼4.80605.51 ▼85.8832.87 ▼21.09
Media Library /wp-admin/upload.php1,559 ▲1594.66 ▲0.46100.77 ▼4.9042.15 ▼4.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/sm-debug-bar/adminpage.class.php+541
    Undefined index: icon_url
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • sm_dbug_bar__admin_panel_vars
    • widget_theysaidso_widget
    • 1
    • theysaidso_admin_options
    • sm_dbug_bar__height

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sm-debug-bar/adminpage.class.php:528

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (A sample of the debug bar with variables printed.), #2 (Admin Panel Options (1.0.2))
Please take inspiration from this readme.txt

sm-debug-bar/sm-debug-bar.php 92% from 13 tests

"SM Debug Bar" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 193 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin607 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP283266595
HTML10012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity21.33
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2083.33%
▷ Protected methods00.00%
▷ Private methods416.67%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
help.png0.77KB0.82KB0.00%
screenshot-2.png24.70KB10.36KB▼ 58.05%
screenshot-1.png50.23KB20.23KB▼ 59.73%