100% admin-bar-hider

Code Review | Hide Admin Bar From Front End

WordPress plugin Hide Admin Bar From Front End scored 100% from 54 tests.

About plugin

  • Plugin page: admin-bar-hider
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.7
  • WordPress version: 5.9.2
  • First release: May 30, 2017
  • Latest release: May 30, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: dev02ali (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 660 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.03MB] [CPU: ▼309.41ms] Passed 4 tests

Analyzing server-side resources used by Hide Admin Bar From Front End
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0450.05 ▼7.95
Dashboard /wp-admin3.41 ▲0.0131.97 ▼1.10
Posts /wp-admin/edit.php3.64 ▲0.0135.96 ▲0.71
Add New Post /wp-admin/post-new.php6.88 ▼0.0993.05 ▼1,227.72
Media Library /wp-admin/upload.php3.30 ▲0.0022.79 ▼0.88

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hide Admin Bar From Front End
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,583 ▼17115.96 ▲0.295.33 ▼1.031.71 ▼1.24
Dashboard /wp-admin2,895 ▲346.13 ▼0.03117.83 ▼17.31165.06 ▲3.40
Posts /wp-admin/edit.php2,685 ▼33.24 ▲0.0063.64 ▼0.22139.55 ▼12.39
Add New Post /wp-admin/post-new.php1,661 ▼016.18 ▼0.11426.87 ▲33.58159.28 ▲2.25
Media Library /wp-admin/upload.php1,698 ▼35.53 ▲0.00142.08 ▲5.32180.69 ▼3.09

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
2 plugin tags: hide admin bar from front end, hide admin bar

admin-bar-hider/admin_bar_hider.php 92% from 13 tests

"Hide Admin Bar From Front End" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("admin-bar-hider.php" instead of "admin_bar_hider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1098

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin