Benchmarks
Plugin footprint 83% from 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.09MB] [CPU: ▼5.19ms] Passed 4 tests
A check of server-side resources used by Hide Admin Bar Based on User Roles
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.10 | 36.97 ▼3.52 |
Dashboard /wp-admin | 3.39 ▲0.09 | 45.13 ▼6.42 |
Posts /wp-admin/edit.php | 3.51 ▲0.15 | 44.89 ▼1.45 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.09 | 81.45 ▼9.38 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 35.73 ▲2.75 |
Hide Admin Bar Settings /wp-admin/options-general.php?page=hide-admin-bar-settings | 3.29 | 32.04 |
Server storage [IO: ▲3.05MB] [DB: ▲0.07MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 156 new files
Database: no new tables, 8 new options
New WordPress options |
---|
can_compress_scripts |
hab_reset_key |
db_upgraded |
widget_theysaidso_widget |
hab_settings |
theysaidso_admin_options |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for Hide Admin Bar Based on User Roles
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,902 ▲140 | 13.27 ▼1.08 | 7.97 ▲6.16 | 40.16 ▼4.69 |
Dashboard /wp-admin | 2,199 ▲24 | 5.50 ▼0.09 | 82.34 ▼20.04 | 35.97 ▼2.34 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 1.98 ▼0.03 | 35.43 ▼4.40 | 33.10 ▼5.82 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.41 ▲0.12 | 654.54 ▲40.28 | 47.67 ▼5.25 |
Media Library /wp-admin/upload.php | 1,401 ▲1 | 4.21 ▲0.04 | 96.30 ▼2.33 | 40.23 ▼1.88 |
Hide Admin Bar Settings /wp-admin/options-general.php?page=hide-admin-bar-settings | 1,299 | 2.28 | 57.66 | 72.60 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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 did not uninstall successfully, leaving 7 options in the database
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
- hab_settings
- widget_recent-posts
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% 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
Almost there! Just fix the following items
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/hide-admin-bar-based-on-user-roles/public/partials/hide-admin-bar-based-on-user-roles-public-display.php
- > /wp-content/plugins/hide-admin-bar-based-on-user-roles/admin/partials/hide-admin-bar-based-on-user-roles-admin-display.php
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 Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: admin bar hide, hide admin bar, admin bar, hide admin bar based on user roles, admin bar hide based on user roles...
hide-admin-bar-based-on-user-roles/hide-admin-bar-based-on-user-roles.php Passed 13 tests
The main PHP script in "Hide Admin Bar Based on User Roles" version 3.6.2 is automatically included on every request by WordPress
96 characters long description:
This plugin is very useful to hide admin bar based on selected user roles and user capabilities.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin23,305 lines of code in 76 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 53 | 1,934 | 526 | 22,396 |
PHP | 12 | 160 | 544 | 387 |
XML | 4 | 0 | 0 | 358 |
JavaScript | 6 | 7 | 44 | 99 |
PO File | 1 | 21 | 23 | 65 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 6.43 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 23.00 |
Average method complexity | 2.36 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 16.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 28 | |
▷ Static methods | 2 | 7.14% |
▷ Public methods | 23 | 82.14% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 17.86% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
68 PNG files occupy 0.21MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/css/square/square@2x.png | 4.37KB | 3.09KB | ▼ 29.43% |
admin/css/square/yellow@2x.png | 4.28KB | 3.07KB | ▼ 28.23% |
admin/css/flat/aero.png | 1.48KB | 1.66KB | 0.00% |
admin/css/minimal/purple.png | 1.11KB | 1.45KB | 0.00% |
admin/css/square/purple@2x.png | 4.40KB | 3.06KB | ▼ 30.39% |