84% hide-admin-bar

Code Review | Hide Admin Bar

WordPress plugin Hide Admin Bar scored84%from 54 tests.

About plugin

  • Plugin page: hide-admin-bar
  • Plugin version: 0.4.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2011
  • Latest release: Dec 1, 2023
  • Number of updates: 55
  • Update frequency: every 84.8 days
  • Top authors: sdenike (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

30,000+ active /698,074 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼8.96ms] Passed 4 tests

Server-side resources used by Hide Admin Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0630.00 ▼11.27
Dashboard /wp-admin3.31 ▼0.0346.17 ▼12.71
Posts /wp-admin/edit.php3.36 ▲0.0049.34 ▲2.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.75 ▼3.80
Media Library /wp-admin/upload.php3.23 ▲0.0030.66 ▼8.07

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Hide Admin Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,616 ▼13114.70 ▲0.531.17 ▼0.5639.34 ▼4.17
Dashboard /wp-admin2,195 ▲185.64 ▲0.0790.47 ▼9.0441.69 ▼3.56
Posts /wp-admin/edit.php2,100 ▼31.97 ▲0.0238.76 ▼8.1835.95 ▼3.70
Add New Post /wp-admin/post-new.php1,530 ▼522.97 ▲0.05607.32 ▼44.0155.27 ▲2.90
Media Library /wp-admin/upload.php1,403 ▲64.19 ▼0.0495.69 ▼1.2841.14 ▼0.46

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hide-admin-bar/hide_admin_bar.php:15

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: hidden, admin, admin bar, hide

hide-admin-bar/hide_admin_bar.php 85% from 13 tests

The main file in "Hide Admin Bar" v. 0.4.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 227 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hide-admin-bar.php" instead of "hide_admin_bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP101310

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin