84% disable-admin-bar-for-non-admins

Code Review | Disable Admin Bar for Non-Admins

WordPress plugin Disable Admin Bar for Non-Admins scored84%from 54 tests.

About plugin

  • Plugin page: disable-admin-bar...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 15, 2021
  • Latest release: Jul 24, 2023
  • Number of updates: 21
  • Update frequency: every 41.0 days
  • Top authors: siriusproio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /867 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Disable Admin Bar for Non-Admins
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.89 ▼5.65
Dashboard /wp-admin3.31 ▲0.0047.05 ▼8.75
Posts /wp-admin/edit.php3.36 ▲0.0051.60 ▼0.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.84 ▼30.51
Media Library /wp-admin/upload.php3.24 ▲0.0036.75 ▲3.04

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable Admin Bar for Non-Admins
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▼0.051.62 ▼0.0840.31 ▼0.07
Dashboard /wp-admin2,189 ▲125.60 ▼0.09102.58 ▲13.3542.70 ▼4.88
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0141.04 ▲5.7435.61 ▼1.68
Add New Post /wp-admin/post-new.php1,545 ▲1423.46 ▲0.36666.99 ▲3.0447.56 ▼3.33
Media Library /wp-admin/upload.php1,397 ▼64.24 ▼0.0798.37 ▼3.1243.21 ▼3.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 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/disable-admin-bar-for-non-admins/disable-admin-bar-for-non-admins.php:20

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can look at the official readme.txt

disable-admin-bar-for-non-admins/disable-admin-bar-for-non-admins.php Passed 13 tests

Analyzing the main PHP file in "Disable Admin Bar for Non-Admins" version 1.2
97 characters long description:
Simply Disable Admin Bar for Non-Admins users like subscribers, authors, editors or contributors.

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
No dangerous file extensions were detected7 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12117

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 code1.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin