84% admin-bar-dashboard-control

Code Review | Admin Bar & Dashboard Access Control

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

About plugin

  • Plugin page: admin-bar-dashboa...
  • Plugin version: 1.2.9
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 25, 2016
  • Latest release: Oct 31, 2023
  • Number of updates: 43
  • Update frequency: every 64.6 days
  • Top authors: Collizo4sky (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

4,000+ active /60,770 total downloads

Benchmarks

Plugin footprint 83% from 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.32MB] [CPU: ▼1.77ms] Passed 4 tests

This is a short check of server-side resources used by Admin Bar & Dashboard Access Control
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3042.72 ▲2.84
Dashboard /wp-admin3.64 ▲0.3448.25 ▼1.83
Posts /wp-admin/edit.php3.67 ▲0.3150.76 ▲3.19
Add New Post /wp-admin/post-new.php6.33 ▲0.4482.08 ▼6.21
Media Library /wp-admin/upload.php3.58 ▲0.3435.16 ▼1.87
Admin Bar & Dash /wp-admin/admin.php?page=admin-bar-dashboard-control3.4733.86
User Sync NEW /wp-admin/admin.php?page=pabc-fusewp3.4436.29

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
abdc_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Bar & Dashboard Access Control
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲12914.72 ▲0.161.53 ▼0.0841.45 ▲3.53
Dashboard /wp-admin2,273 ▲935.66 ▼0.0088.34 ▼16.3552.79 ▲6.11
Posts /wp-admin/edit.php2,129 ▲261.98 ▼0.0038.40 ▲2.9337.45 ▲1.36
Add New Post /wp-admin/post-new.php1,550 ▲2423.66 ▲0.14666.61 ▼22.1160.57 ▲5.51
Media Library /wp-admin/upload.php1,423 ▲234.17 ▲0.0399.91 ▲4.4643.10 ▼0.27
Admin Bar & Dash /wp-admin/admin.php?page=admin-bar-dashboard-control1,1102.0325.4027.30
User Sync NEW /wp-admin/admin.php?page=pabc-fusewp9092.0526.9238.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PABC_PluginSilentUpgraderSkin' not found in wp-content/plugins/admin-bar-dashboard-control/fuse/Installer/PABC_Install_Skin.php:8
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader.php): failed to open stream: No such file or directory in wp-content/plugins/admin-bar-dashboard-control/fuse/FuseWP.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader-skin.php): failed to open stream: No such file or directory in wp-content/plugins/admin-bar-dashboard-control/fuse/Installer/PluginSilentUpgraderSkin.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/admin-bar-dashboard-control/fuse/Installer/PluginSilentUpgrader.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader-skin.php' (include_path='.:/usr/share/php') in wp-content/plugins/admin-bar-dashboard-control/fuse/Installer/PluginSilentUpgraderSkin.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/admin-bar-dashboard-control/fuse/Installer/PluginSilentUpgraderSkin.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader.php): failed to open stream: No such file or directory in wp-content/plugins/admin-bar-dashboard-control/fuse/Installer/PluginSilentUpgrader.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader.php' (include_path='.:/usr/share/php') in wp-content/plugins/admin-bar-dashboard-control/fuse/Installer/PluginSilentUpgrader.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/admin-bar-dashboard-control/fuse/FuseWP.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader.php' (include_path='.:/usr/share/php') in wp-content/plugins/admin-bar-dashboard-control/fuse/FuseWP.php on line 4

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • 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 entry point to "Admin Bar & Dashboard Access Control" version 1.2.9 is a PHP file that has certain tags in its header comment area
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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,361 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP92994371,245
JavaScript14323112
SVG4004

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity19.86
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods50
▷ Static methods1020.00%
▷ Public methods4182.00%
▷ Protected methods918.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.07MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
fuse/fusewp-user-sync-edit-screen.png69.11KB69.12KB0.00%