78% wp-hide-admin-bar

Code Review | WP Hide Admin Bar

WordPress plugin WP Hide Admin Bar scored78%from 54 tests.

About plugin

  • Plugin page: wp-hide-admin-bar
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Mar 18, 2013
  • Latest release: May 13, 2014
  • Number of updates: 7
  • Update frequency: every 60.3 days
  • Top authors: ravinderkhurana (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

900+ active /17,173 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.01MB] [CPU: ▼6.65ms] Passed 4 tests

A check of server-side resources used by WP Hide Admin Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0438.14 ▼3.06
Dashboard /wp-admin3.33 ▲0.0349.73 ▲1.24
Posts /wp-admin/edit.php3.38 ▲0.0249.75 ▲1.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.71 ▼20.06
Media Library /wp-admin/upload.php3.25 ▲0.0237.89 ▼4.70
WP Hide Admin Bar /wp-admin/options-general.php?page=WPHideAdminBar3.2233.60

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
whab_display_admin_settings
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Hide Admin Bar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,630 ▼11614.72 ▲0.141.49 ▼0.3243.11 ▲1.29
Dashboard /wp-admin2,210 ▲215.79 ▲0.85113.65 ▲2.0043.07 ▼3.08
Posts /wp-admin/edit.php2,096 ▲42.04 ▲0.0034.43 ▼3.2733.67 ▲0.72
Add New Post /wp-admin/post-new.php1,517 ▼717.72 ▼5.54665.70 ▼19.5456.98 ▲5.21
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.0196.46 ▼17.1942.62 ▼6.03
WP Hide Admin Bar /wp-admin/options-general.php?page=WPHideAdminBar9011.6726.2026.44

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

Smoke tests 50% 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 0% 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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-hide-admin-bar/class.admin.php
    • > /wp-content/plugins/wp-hide-admin-bar/admin.bar.php
    • > /wp-content/plugins/wp-hide-admin-bar/functions.load.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-hide-admin-bar/wp-hide-admin-bar.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-hide-admin-bar/wp-hide-admin-bar.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed: You can look at the official readme.txt

wp-hide-admin-bar/wp-hide-admin-bar.php Passed 13 tests

The principal PHP file in "WP Hide Admin Bar" v. 2.0 is loaded by WordPress automatically on each request
107 characters long description:
Plugin to hide admin toolbar from front end when login. For change settings (Settings -> WP Hide Admin Bar)

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
Success! There were no dangerous files found in this plugin131 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43411131

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
No PNG images were found in this plugin