84% wp-hide-adminbar

Code Review | WP Hide Admin Bar

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

About plugin

  • Plugin page: wp-hide-adminbar
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.4
  • WordPress version: 6.3.1
  • First release: Apr 3, 2019
  • Latest release: Mar 7, 2020
  • Number of updates: 6
  • Update frequency: every 56.5 days
  • Top authors: raviry (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /2,162 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.09MB] [CPU: ▼18.28ms] Passed 4 tests

An overview of server-side resources used by WP Hide Admin Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.6118.31 ▼22.16
Dashboard /wp-admin3.40 ▲0.0642.29 ▼24.82
Posts /wp-admin/edit.php3.44 ▲0.0846.79 ▲0.33
Add New Post /wp-admin/post-new.php6.09 ▲0.2172.29 ▼26.48
Media Library /wp-admin/upload.php3.34 ▲0.1133.90 ▲1.39
Hide Admin Bar /wp-admin/options-general.php?page=wp-hide-adminbar_options3.2428.28

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Hide Admin Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.22 ▼1.071.48 ▼0.3644.61 ▲1.52
Dashboard /wp-admin2,216 ▲284.89 ▼0.92101.46 ▼19.9639.75 ▼7.04
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0240.22 ▲5.3635.88 ▲0.08
Add New Post /wp-admin/post-new.php1,520 ▲117.60 ▼5.55654.40 ▲29.4955.44 ▲4.33
Media Library /wp-admin/upload.php1,398 ▲134.43 ▲0.23101.26 ▼3.8841.92 ▼1.23
Hide Admin Bar /wp-admin/options-general.php?page=wp-hide-adminbar_options8822.0723.6728.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp-hide-adminbar_options
    • > Notice in wp-content/plugins/wp-hide-adminbar/wp-hide-adminbar.php+177
    Undefined property: Wp_Hide_Adminbar::$pluginName
    • > GET request to /wp-admin/options-general.php?page=wp-hide-adminbar_options
    • > Notice in wp-content/plugins/wp-hide-adminbar/wp-hide-adminbar.php+179
    Undefined variable: pluginName

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: hide admin-bar based on user capabilities, wp hide admin bar, admin bar hide, hide admin bar, hide admin-bar based on user roles

wp-hide-adminbar/wp-hide-adminbar.php Passed 13 tests

The primary PHP file in "WP Hide Admin Bar" version 1.0.2 is used by WordPress to initiate all plugin functionality
66 characters long description:
Hide admin bar based on selected user roles and user capabilities.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected173 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15229173

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
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
PNG images were not found in this plugin