94% debug-bar-roles-and-capabilities

Code Review | Debug Bar Roles and Capabilities

WordPress plugin Debug Bar Roles and Capabilities scored 94% from 54 tests.

About plugin

  • Plugin page: debug-bar-roles-a...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9
  • WordPress version: 5.8.1
  • First release: May 20, 2014
  • Latest release: May 20, 2014
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: mboynes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,789 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼147.67ms] Passed 4 tests

This is a short check of server-side resources used by Debug Bar Roles and Capabilities
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0036.12 ▲0.21
Dashboard /wp-admin3.06 ▲0.0137.53 ▼12.79
Posts /wp-admin/edit.php3.11 ▲0.0143.29 ▼0.93
Add New Post /wp-admin/post-new.php5.42 ▼0.0191.35 ▼576.43
Media Library /wp-admin/upload.php3.01 ▲0.0032.56 ▼0.51

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Debug Bar Roles and Capabilities
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10715.97 ▲0.3210.47 ▲1.7045.59 ▼0.33
Dashboard /wp-admin2,969 ▲326.11 ▲0.07154.30 ▼10.30104.89 ▼5.82
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0079.89 ▲9.7288.44 ▼3.28
Add New Post /wp-admin/post-new.php3,687 ▲2,01515.13 ▼3.85491.26 ▲89.70103.25 ▼7.16
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.00161.54 ▲13.71115.10 ▼0.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Bar_Panel' not found in wp-content/plugins/debug-bar-roles-and-capabilities/class-debug-bar-roles-and-capabilities-panel.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/debug-bar-roles-and-capabilities/debug-bar-roles-and-capabilities.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: debug bar, permissions, roles, users, capabilities...

debug-bar-roles-and-capabilities/debug-bar-roles-and-capabilities.php Passed 13 tests

The main PHP file in "Debug Bar Roles and Capabilities" ver. 0.1.1 adds more information about the plugin and also serves as the entry point for this plugin
71 characters long description:
A simple add-on for Debug Bar that tabulates all roles and capabilities

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
Success! There were no dangerous files found in this plugin67 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP272667

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin