94% admin-bar-dashboard-control

Code Review | Admin Bar & Dashboard Access Control

WordPress plugin Admin Bar & Dashboard Access Control scored 94% from 54 tests.

About plugin

  • Plugin page: admin-bar-dashboa...
  • Plugin version: 1.2.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 5.9.2
  • First release: Mar 25, 2016
  • Latest release: Aug 12, 2020
  • Number of updates: 34
  • Update frequency: every 47.1 days
  • Top authors: Collizo4sky (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

5,000+ active / 47,518 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼297.97ms] Passed 4 tests

A check of server-side resources used by Admin Bar & Dashboard Access Control
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.1657.86 ▲5.82
Dashboard /wp-admin3.57 ▲0.1333.60 ▼1.07
Posts /wp-admin/edit.php3.78 ▲0.1038.47 ▲0.07
Add New Post /wp-admin/post-new.php7.35 ▲0.3585.10 ▼1,188.83
Media Library /wp-admin/upload.php3.46 ▲0.1322.53 ▼2.04

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Bar & Dashboard Access Control
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,888 ▲13415.57 ▼0.116.54 ▼0.472.61 ▼0.40
Dashboard /wp-admin2,985 ▲1346.15 ▼0.01120.80 ▼25.04173.50 ▲9.21
Posts /wp-admin/edit.php2,708 ▲143.37 ▲0.1464.39 ▲0.55142.36 ▲3.37
Add New Post /wp-admin/post-new.php1,674 ▼3716.13 ▼4.66454.80 ▼11.80153.23 ▼4.87
Media Library /wp-admin/upload.php1,715 ▲175.53 ▲0.07142.28 ▲0.80188.31 ▼5.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
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 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-bar-dashboard-control/mo-admin-notice-featured.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/admin-bar-dashboard-control/include.settings-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ProfilePress\\PP_Admin_Bar_Control\\register_activation_hook() in wp-content/plugins/admin-bar-dashboard-control/admin-bar-dashboard-control.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
The official readme.txt is a good inspiration

admin-bar-dashboard-control/admin-bar-dashboard-control.php Passed 13 tests

The main file in "Admin Bar & Dashboard Access Control" v. 1.2.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
60 characters long description:
Disable admin bar and control access to WordPress dashboard.

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
There were no executable files found in this plugin513 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity14.33
▷ Minimum class complexity9.00
▷ Maximum class complexity22.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods942.86%
▷ Public methods21100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected