67% debug-objects

Code Review | Debug Objects

WordPress plugin Debug Objects scored 67% from 54 tests.

About plugin

  • Plugin page: debug-objects
  • Plugin version: 2.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9
  • WordPress version: 5.9.2
  • First release: Jun 21, 2009
  • Latest release: Nov 10, 2017
  • Number of updates: 233
  • Update frequency: every 17.1 days
  • Top authors: Bueltge (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

400+ active / 83,153 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼291.88ms] Passed 4 tests

A check of server-side resources used by Debug Objects
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.2562.64 ▲5.22
Dashboard /wp-admin3.61 ▲0.2038.99 ▲0.65
Posts /wp-admin/edit.php3.83 ▲0.1955.15 ▲12.80
Add New Post /wp-admin/post-new.php7.07 ▲0.10101.88 ▼1,166.67
Media Library /wp-admin/upload.php3.48 ▲0.1928.38 ▼6.73
Debug Objects /wp-admin/tools.php?page=debug-objects/inc/autoload/class-settings.php3.4527.75

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 84 new files
Database: 1 new table, 1 new option
New tables
wp_hook_list
New WordPress options
debug_objects

Browser metrics Passed 4 tests

A check of browser resources used by Debug Objects
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲6615.74 ▼0.265.61 ▲0.072.18 ▼0.23
Dashboard /wp-admin2,908 ▲506.14 ▼0.05115.57 ▼15.76177.56 ▲20.16
Posts /wp-admin/edit.php2,708 ▲202.93 ▼0.3165.45 ▲1.48141.58 ▼7.42
Add New Post /wp-admin/post-new.php1,674 ▼7816.42 ▼0.23398.85 ▼31.75190.97 ▲27.02
Media Library /wp-admin/upload.php1,712 ▲145.53 ▼0.01123.15 ▼20.31202.44 ▲20.57
Debug Objects /wp-admin/tools.php?page=debug-objects/inc/autoload/class-settings.php2,2252.3955.63137.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method Debug_Objects::on_uninstall() should not be called statically
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_hook_list

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 37× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/debug-objects/inc/class-cron.php
    • > /wp-content/plugins/debug-objects/inc/class-rewrites.php
    • > /wp-content/plugins/debug-objects/inc/class-constants.php
    • > /wp-content/plugins/debug-objects/inc/class-options.php
    • > /wp-content/plugins/debug-objects/inc/class-all_hooks.php
    • > /wp-content/plugins/debug-objects/inc/class-theme.php
    • > /wp-content/plugins/debug-objects/inc/class-classes.php
    • > /wp-content/plugins/debug-objects/inc/class-cache.php
    • > /wp-content/plugins/debug-objects/inc/class-enqueue_stuff.php
    • > /wp-content/plugins/debug-objects/inc/class-roles.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Objects' not found in wp-content/plugins/debug-objects/inc/class-fields_api.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Objects' not found in wp-content/plugins/debug-objects/inc/class-woocommerce.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Objects' not found in wp-content/plugins/debug-objects/inc/class-request.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Screenshots: Please a description for screenshot #3 in debug-objects/assets to your readme.txt
The official readme.txt is a good inspiration

debug-objects/debug-objects.php 77% from 13 tests

The main PHP script in "Debug Objects" version 2.5.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Description: Keep the plugin description shorter than 140 characters (currently 415 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected14,277 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,5706,1847,006
PHP421,9132,6476,410
CSS5104172728
Markdown1520133

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 111)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity26.70
▷ Minimum class complexity2.00
▷ Maximum class complexity166.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity111.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes40
▷ Abstract classes00.00%
▷ Concrete classes40100.00%
▷ Final classes00.00%
Methods294
▷ Static methods6923.47%
▷ Public methods25687.07%
▷ Protected methods155.10%
▷ Private methods237.82%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants20
▷ Global constants525.00%
▷ Class constants1575.00%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
24 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/ui-bg_highlight-hard_75_ececec_1x100.png0.25KB0.13KB▼ 47.62%
img/back_enabled.png1.35KB0.60KB▼ 55.69%
img/ui-icons_999999_256x240.png6.82KB4.17KB▼ 38.81%
img/ui-icons_333333_256x240.png6.81KB4.17KB▼ 38.71%
img/back_disabled.png1.33KB0.60KB▼ 55.11%