84% debug-bar-remote-requests

Code Review | Debug Bar Remote Requests

WordPress plugin Debug Bar Remote Requests scored84%from 54 tests.

About plugin

  • Plugin page: debug-bar-remote-...
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9
  • WordPress version: 6.3.1
  • First release: Apr 20, 2014
  • Latest release: Apr 23, 2014
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: mboynes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /21,751 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Debug Bar Remote Requests
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.08 ▼9.39
Dashboard /wp-admin3.31 ▲0.0143.28 ▼5.50
Posts /wp-admin/edit.php3.36 ▲0.0142.14 ▼6.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.02 ▼9.54
Media Library /wp-admin/upload.php3.23 ▲0.0136.29 ▲3.88

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Debug Bar Remote Requests
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.25 ▼1.161.68 ▼0.3839.50 ▼5.10
Dashboard /wp-admin2,206 ▲155.88 ▲0.81102.87 ▼15.3441.83 ▼5.45
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0336.41 ▲1.7932.64 ▼4.47
Add New Post /wp-admin/post-new.php1,519 ▼1223.18 ▲4.58627.29 ▼35.8664.29 ▼10.37
Media Library /wp-admin/upload.php1,391 ▼04.17 ▼0.01100.41 ▲2.1642.89 ▼2.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Bar_Panel' not found in wp-content/plugins/debug-bar-remote-requests/class-debug-bar-remote-requests-panel.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/debug-bar-remote-requests/debug-bar-remote-requests.php:122

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: debug bar, api, http api, debug, curl...

debug-bar-remote-requests/debug-bar-remote-requests.php Passed 13 tests

The entry point to "Debug Bar Remote Requests" version 0.1.2 is a PHP file that has certain tags in its header comment area
104 characters long description:
A simple add-on for Debug Bar that logs and profiles all remote requests made using the HTTP Request API

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected141 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22522141

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.50
▷ Minimum class complexity4.00
▷ Maximum class complexity13.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin