94% admin-bar-disabler

Code Review | Admin Bar Disabler

WordPress plugin Admin Bar Disabler scored 94% from 54 tests.

About plugin

  • Plugin page: admin-bar-disabler
  • Plugin version: 1.4.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.9
  • WordPress version: 5.9.2
  • First release: Feb 24, 2011
  • Latest release: Mar 5, 2022
  • Number of updates: 29
  • Update frequency: every 138.9 days
  • Top authors: sc0ttkclark (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

10,000+ active / 149,714 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼296.87ms] Passed 4 tests

This is a short check of server-side resources used by Admin Bar Disabler
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0957.21 ▲8.33
Dashboard /wp-admin3.47 ▲0.0636.99 ▲3.33
Posts /wp-admin/edit.php3.70 ▲0.0639.15 ▲0.43
Add New Post /wp-admin/post-new.php6.94 ▼0.0396.03 ▼1,189.69
Media Library /wp-admin/upload.php3.35 ▲0.0624.10 ▼1.54
Admin Bar Disabler /wp-admin/options-general.php?page=admin_bar_disabler3.3224.51

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Admin Bar Disabler
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,769 ▲4716.19 ▲0.516.00 ▼0.132.02 ▼0.26
Dashboard /wp-admin2,897 ▲366.08 ▼0.00120.14 ▼16.58161.39 ▼7.65
Posts /wp-admin/edit.php2,690 ▲333.23 ▼0.0062.41 ▼4.90139.99 ▼1.90
Add New Post /wp-admin/post-new.php1,671 ▼4818.21 ▼4.31396.14 ▼40.87156.51 ▼13.64
Media Library /wp-admin/upload.php1,703 ▲55.54 ▼0.02139.30 ▼4.29186.09 ▼4.92
Admin Bar Disabler /wp-admin/options-general.php?page=admin_bar_disabler1,2282.3655.04160.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-bar-disabler/admin-bar-disabler.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: toolbar, admin bar, admin menu

admin-bar-disabler/admin-bar-disabler.php Passed 13 tests

"Admin Bar Disabler" version 1.4.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
138 characters long description:
Disable the WP Admin Bar / Toolbar on the frontend of sites for specific roles and capabilities based on inclusion and exclusion settings.

Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected289 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin