84% hide-admin-toolbar

Code Review | Hide Admin Toolbar

WordPress plugin Hide Admin Toolbar scored84%from 54 tests.

About plugin

  • Plugin page: hide-admin-toolbar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0
  • WordPress version: 6.3.1
  • First release: Nov 12, 2016
  • Latest release: Jul 2, 2022
  • Number of updates: 17
  • Update frequency: every 120.8 days
  • Top authors: aftabmuni (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10,000+ active /44,532 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼4.65ms] Passed 4 tests

Analyzing server-side resources used by Hide Admin Toolbar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0640.19 ▼6.71
Dashboard /wp-admin3.31 ▲0.0150.59 ▼4.11
Posts /wp-admin/edit.php3.37 ▲0.0051.63 ▼1.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0092.90 ▼6.43
Media Library /wp-admin/upload.php3.24 ▲0.0040.31 ▲1.96

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Hide Admin Toolbar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,615 ▼14614.36 ▲0.111.63 ▼1.0046.35 ▼0.06
Dashboard /wp-admin2,189 ▲155.56 ▼0.0188.11 ▼12.9139.94 ▼4.00
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0541.18 ▲4.9637.56 ▲1.56
Add New Post /wp-admin/post-new.php1,528 ▲223.17 ▲0.27628.98 ▼35.7456.02 ▲7.62
Media Library /wp-admin/upload.php1,403 ▲34.31 ▲0.17101.86 ▼3.2742.26 ▼4.25

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

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)
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/hide-admin-toolbar/hide-admin-toolbar.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
4 plugin tags: disable admin bar, hide admin bar, disable admin toolbar, remove admin bar from website

hide-admin-toolbar/hide-admin-toolbar.php Passed 13 tests

The primary PHP file in "Hide Admin Toolbar" version 1.0 is used by WordPress to initiate all plugin functionality
122 characters long description:
This plugin is used to hide admin toolbar from website. It will hide that bar when you are logged in and viewing the site.

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 plugin14 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171814

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin