77% ultimate-debugbar

Code Review | Ultimate DebugBar

WordPress plugin Ultimate DebugBar scored77%from 54 tests.

About plugin

  • Plugin page: ultimate-debugbar
  • Plugin version: 0.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8
  • WordPress version: 6.3.1
  • First release: Jun 21, 2019
  • Latest release: Nov 1, 2021
  • Number of updates: 6
  • Update frequency: every 144.0 days
  • Top authors: Avram (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,650 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲5.01MB] [CPU: ▲64.02ms] 75% from 4 tests

Server-side resources used by Ultimate DebugBar
Please take the time to fix the following items
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.01MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /8.39 ▲4.93107.37 ▲57.94
Dashboard /wp-admin8.41 ▲5.11117.32 ▲66.96
Posts /wp-admin/edit.php8.53 ▲5.17115.06 ▲67.64
Add New Post /wp-admin/post-new.php13.68 ▲7.79226.20 ▲120.64
Media Library /wp-admin/upload.php8.04 ▲4.8198.14 ▲63.55

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultimate DebugBar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /23,708 ▲20,96216.55 ▲1.99121.39 ▲118.8543.61 ▼2.67
Dashboard /wp-admin13,146 ▲10,9586.96 ▲1.99233.43 ▲124.6640.04 ▼2.37
Posts /wp-admin/edit.php13,200 ▲11,1114.49 ▲2.52180.97 ▲142.7038.25 ▲2.50
Add New Post /wp-admin/post-new.php6,431 ▲4,89622.89 ▼0.21816.08 ▲108.7343.92 ▼17.44
Media Library /wp-admin/upload.php11,534 ▲10,1435.72 ▲1.50218.05 ▲100.6448.55 ▲3.26

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/build/namespaceFontAwesome.php
    • > /wp-content/plugins/ultimate-debugbar/ultimate-debugbar.php
  • 143× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'DebugBar\\DataCollector\\DataCollector' not found in wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/src/DebugBar/DataCollector/TimeDataCollector.php:19
    • > PHP Warning
      include(wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/demo/bridge/twig/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/demo/bridge/twig/index.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/demo/bridge/doctrine/bootstrap.php on line 6
    • > PHP Fatal error
      Uncaught Error: Interface 'DebugBar\\HttpDriverInterface' not found in wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/src/DebugBar/PhpHttpDriver.php:16
    • > PHP Warning
      include(wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/demo/bridge/monolog/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/demo/bridge/monolog/index.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'DebugBar\\Bridge\\MonologCollector' not found in wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/src/DebugBar/Bridge/CacheCacheCollector.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Cloner\\Stub' not found in wp-content/plugins/ultimate-debugbar/vendor/symfony/var-dumper/Caster/ConstStub.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'DebugBar\\DataCollector\\DataCollector' not found in wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/src/DebugBar/DataCollector/ExceptionsCollector.php:19
    • > PHP Warning
      include(): Failed opening 'wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/demo/bridge/propel/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/ultimate-debugbar/vendor/maximebf/debugbar/demo/bridge/propel/index.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Tests\\Fixtures\otLoadableClass' not found in wp-content/plugins/ultimate-debugbar/vendor/symfony/var-dumper/Tests/Fixtures/NotLoadableClass.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (List of all database queries with their timings), #2 (List of (slow) hooks lasting over 1ms in an AJAX request), #3 (Deserialized/formatted config options), #4 (Timeline (waterfall) of WP execution (TTFB))
You can look at the official readme.txt

ultimate-debugbar/ultimate-debugbar.php 92% from 13 tests

The main PHP file in "Ultimate DebugBar" ver. 0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected24,538 lines of code in 247 files:
LanguageFilesBlank linesComment linesLines of code
PHP1842,9944,74517,945
SVG1002,671
JavaScript83055741,432
Markdown173930923
CSS109018893
JSON1500521
XML54884
YAML18033
HTML30016
SQL11015
Bourne Shell2205

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.35
Average class complexity11.25
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces33
Interfaces14
Traits3
Classes137
▷ Abstract classes64.38%
▷ Concrete classes13195.62%
▷ Final classes10.76%
Methods1,050
▷ Static methods16415.62%
▷ Public methods95791.14%
▷ Protected methods615.81%
▷ Private methods323.05%
Functions104
▷ Named functions4644.23%
▷ Anonymous functions5855.77%
Constants51
▷ Global constants611.76%
▷ Class constants4588.24%
▷ Public constants45100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.87MB with 0.56MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/maximebf/debugbar/docs/screenshot.png15.07KB6.75KB▼ 55.24%
screenshot-4.png140.25KB40.32KB▼ 71.25%
screenshot-3.png200.98KB66.08KB▼ 67.12%
screenshot-1.png343.20KB126.80KB▼ 63.05%
screenshot-2.png196.28KB69.78KB▼ 64.45%