84% better-admin-bar

Code Review | Hide Admin Bar & More - Better Admin Bar

WordPress plugin Hide Admin Bar & More - Better Admin Bar scored84%from 54 tests.

About plugin

  • Plugin page: better-admin-bar
  • Plugin version: 4.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Jun 16, 2014
  • Latest release: Nov 30, 2023
  • Number of updates: 110
  • Update frequency: every 31.6 days
  • Top authors: kubiq (83.64%)davidvongries (17.27%)

Code review

54 tests

User reviews

19 reviews

Install metrics

5,000+ active /74,204 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼7.36ms] Passed 4 tests

This is a short check of server-side resources used by Hide Admin Bar & More - Better Admin Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3644.71 ▲0.03
Dashboard /wp-admin3.59 ▲0.2855.91 ▲2.83
Posts /wp-admin/edit.php3.71 ▲0.3551.84 ▼4.78
Add New Post /wp-admin/post-new.php6.19 ▲0.3097.34 ▼27.50
Media Library /wp-admin/upload.php3.51 ▲0.2838.62 ▲4.78
Better Admin Bar /wp-admin/options-general.php?page=better-admin-bar3.5539.94

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 71 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
swift_control_compat_migrate_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Hide Admin Bar & More - Better Admin Bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,046 ▲29913.82 ▼0.5214.46 ▲12.5539.91 ▼7.10
Dashboard /wp-admin2,237 ▲605.52 ▼0.1196.96 ▲4.3985.19 ▲37.06
Posts /wp-admin/edit.php2,164 ▲642.13 ▲0.1240.96 ▲1.4345.94 ▲6.66
Add New Post /wp-admin/post-new.php1,577 ▲5123.27 ▲0.12728.65 ▲39.7151.82 ▼0.57
Media Library /wp-admin/upload.php1,451 ▲514.20 ▼0.02101.58 ▼3.5180.51 ▲33.99
Better Admin Bar /wp-admin/options-general.php?page=better-admin-bar2,7933.62104.72115.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • swift_control_compat_migrate_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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
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
  • 19× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/better-admin-bar/templates/setting-boxes/available-widgets.php
    • > /wp-content/plugins/better-admin-bar/uninstall.php
    • > /wp-content/plugins/better-admin-bar/templates/setting-boxes/active-widgets.php
    • > /wp-content/plugins/better-admin-bar/inc/available-widgets.php
    • > /wp-content/plugins/better-admin-bar/better-admin-bar.php
    • > /wp-content/plugins/better-admin-bar/templates/setting-boxes/misc-settings.php
    • > /wp-content/plugins/better-admin-bar/inc/active-widgets.php
    • > /wp-content/plugins/better-admin-bar/helpers.php
    • > /wp-content/plugins/better-admin-bar/inc/pro-widgets.php
    • > /wp-content/plugins/better-admin-bar/templates/setting-boxes/display-settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: 32px, quick edit, margin, adminbar, replace admin bar...

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

"Hide Admin Bar & More - Better Admin Bar" version 4.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
65 characters long description:
Hide WordPress admin bar, replace it with a better swift control.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin15,096 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,445
PHP265526711,929
CSS92791581,351
JSON2001,226
JavaScript112913051,138
XML1107

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 code0.35
Average class complexity18.25
▷ Minimum class complexity2.00
▷ Maximum class complexity70.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods49
▷ Static methods48.16%
▷ Public methods49100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png16.70KB7.43KB▼ 55.48%