10% developer-toolbar

Code Review | Developer Toolbar

WordPress plugin Developer Toolbar scored 10% from 54 tests.

About plugin

  • Plugin page: developer-toolbar
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0
  • WordPress version: 5.8.1
  • First release: Jan 20, 2014
  • Latest release: Dec 2, 2014
  • Number of updates: 7
  • Update frequency: every 45.3 days
  • Top authors: bap22 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,402 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/developer-toolbar/classes/debugger.class.php+119
    Function create_function() is deprecated

Server metrics [RAM: ▼1.80MB] [CPU: ▼189.66ms] Passed 4 tests

Server-side resources used by Developer Toolbar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.83 ▼0.899.91 ▼10.69
Dashboard /wp-admin1.85 ▼1.216.60 ▼46.18
Posts /wp-admin/edit.php1.85 ▼1.275.83 ▼46.15
Add New Post /wp-admin/post-new.php1.85 ▼3.585.72 ▼637.96
Media Library /wp-admin/upload.php1.85 ▼1.155.26 ▼28.36
phpInfo /wp-admin/admin.php?page=dev-toolbar-phpinfo1.855.52
Server Info /wp-admin/admin.php?page=dev-toolbar-serverinfo1.855.61
Developer /wp-admin/admin.php?page=developer-toolbar/developer-toolbar.php1.856.04
Rewrite Rules /wp-admin/admin.php?page=dev-toolbar-rewrites1.855.50

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 32 new files
Database: 1 new table, no new options
New tables
wp_lgx_developer_toolbar

Browser metrics Passed 4 tests

A check of browser resources used by Developer Toolbar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,414 ▲77716.40 ▲0.7214.16 ▲5.1653.84 ▲4.75
Dashboard /wp-admin3,012 ▲785.93 ▼0.04133.31 ▼7.91133.83 ▲20.71
Posts /wp-admin/edit.php2,804 ▲652.74 ▲0.0271.43 ▲6.7786.50 ▲0.51
Add New Post /wp-admin/post-new.php1,711 ▼15918.80 ▼0.67365.56 ▼22.72111.83 ▼0.42
Media Library /wp-admin/upload.php1,801 ▼35.05 ▲0.04131.48 ▼25.05136.19 ▲4.75
phpInfo /wp-admin/admin.php?page=dev-toolbar-phpinfo9,1352.4861.16136.40
Server Info /wp-admin/admin.php?page=dev-toolbar-serverinfo1,3472.0851.5772.03
Developer /wp-admin/admin.php?page=developer-toolbar/developer-toolbar.php1,8552.1957.0375.48
Rewrite Rules /wp-admin/admin.php?page=dev-toolbar-rewrites1,0932.1155.6792.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/developer-toolbar/classes/debugger.class.php+119
    Function create_function() is deprecated

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dev-toolbar-rewrites
    • > Deprecated in wp-content/plugins/developer-toolbar/classes/debugger.class.php+128
    Function create_function() is deprecated

SRP 0% 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 take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/developer-toolbar/views/phpinfo.php
    • > /wp-content/plugins/developer-toolbar/views/serverinfo.php
    • > /wp-content/plugins/developer-toolbar/views/rewrites.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: public_query_vars in wp-content/plugins/developer-toolbar/views/rewrites.php on line 24
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/developer-toolbar/views/checklists.php:1
    • > PHP Notice
      Undefined variable: rewrite_rules_array in wp-content/plugins/developer-toolbar/views/rewrites.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/developer-toolbar/developer-toolbar.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/developer-toolbar/views/toolbar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/developer-toolbar/classes/debugger.class.php:119
    • > PHP Notice
      Undefined variable: rewrite_rules in wp-content/plugins/developer-toolbar/views/rewrites.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Showing the frontend developer toolbar.), #2 (Shows the backend general information and checklists.)
The official readme.txt is a good inspiration

developer-toolbar/developer-toolbar.php 92% from 13 tests

The primary PHP file in "Developer Toolbar" version 1.0.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 231 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,018 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP8163311868
JavaScript241761
CSS10160
XML50029

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.21
Average class complexity13.50
▷ Minimum class complexity11.00
▷ Maximum class complexity16.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods39
▷ Static methods12.56%
▷ Public methods3076.92%
▷ Protected methods820.51%
▷ Private methods12.56%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
11 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/close.png0.26KB0.22KB▼ 13.21%
img/wordpress.png1.01KB0.61KB▼ 39.56%
img/screen.png0.16KB0.12KB▼ 23.60%
img/info_white.png49.89KB0.49KB▼ 99.01%
img/file.png0.24KB0.17KB▼ 27.94%