10% admin-bar-hide

Code Review | Admin Bar Hide

WordPress plugin Admin Bar Hide scored10%from 54 tests.

About plugin

  • Plugin page: admin-bar-hide
  • Plugin version: 0.1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 12, 2015
  • Latest release: Jul 5, 2019
  • Number of updates: 11
  • Update frequency: every 135.3 days
  • Top authors: sk.shaikat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,172 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/admin-bar-hide/admin-bar-hide.php+45
    require_once(wp-content/plugins/admin-bar-hide/freemius/start.php): failed to open stream: No such file or directory

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

An overview of server-side resources used by Admin Bar Hide
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.60 ▼7.25
Dashboard /wp-admin3.31 ▼0.0449.92 ▼20.94
Posts /wp-admin/edit.php3.36 ▲0.0046.17 ▼2.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.23 ▼16.13
Media Library /wp-admin/upload.php3.23 ▲0.0032.01 ▼1.42

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Admin Bar Hide
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.161.67 ▼0.0642.89 ▼2.32
Dashboard /wp-admin2,206 ▲144.88 ▼0.09109.31 ▼17.5838.29 ▼9.03
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0338.81 ▲4.0334.86 ▲0.61
Add New Post /wp-admin/post-new.php1,542 ▲2318.25 ▼4.92615.13 ▼45.3754.61 ▲0.81
Media Library /wp-admin/upload.php1,385 ▼64.17 ▼0.1494.43 ▼9.6542.19 ▼4.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(wp-content/plugins/admin-bar-hide/freemius/start.php): failed to open stream: No such file or directory in wp-content/plugins/admin-bar-hide/admin-bar-hide.php on line 45
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/admin-bar-hide/freemius/start.php' (include_path='.:/usr/share/php') in wp-content/plugins/admin-bar-hide/admin-bar-hide.php on line 45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: hide, hide admin bar, header toolbar hide, admin toolbar, admin bar hide...

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

The entry point to "Admin Bar Hide" version 0.1.0.2 is a PHP file that has certain tags in its header comment area
73 characters long description:
Hide admin toolbar for all other users. Only admin can have that toolbar.

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 plugin61 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13110059
JavaScript1302

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.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

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