78% hide-admin-bar-by-rocketcode

Code Review | Hide Admin Bar by RocketCode

WordPress plugin Hide Admin Bar by RocketCode scored78%from 54 tests.

About plugin

  • Plugin page: hide-admin-bar-by...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 25, 2023
  • Latest release: Jul 14, 2023
  • Number of updates: 3
  • Update frequency: every 56.7 days
  • Top authors: rocketcode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /146 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

An overview of server-side resources used by Hide Admin Bar by RocketCode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0435.73 ▼10.07
Dashboard /wp-admin3.33 ▲0.0349.57 ▼1.12
Posts /wp-admin/edit.php3.38 ▲0.0346.34 ▼5.46
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.20 ▼5.11
Media Library /wp-admin/upload.php3.26 ▲0.0338.51 ▲0.04
Hide Admin Bar - RocketCode /wp-admin/options-general.php?page=rocketcode_hab3.2032.95

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Hide Admin Bar by RocketCode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,630 ▼14113.57 ▼0.814.66 ▲2.6743.90 ▼2.39
Dashboard /wp-admin2,210 ▲225.85 ▼0.03106.68 ▲4.0639.36 ▼5.70
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0736.99 ▼2.8631.44 ▼6.59
Add New Post /wp-admin/post-new.php1,541 ▲1223.14 ▲4.67678.08 ▲78.7352.41 ▼0.71
Media Library /wp-admin/upload.php1,386 ▼54.18 ▲0.00101.06 ▼3.5540.49 ▼6.86
Hide Admin Bar - RocketCode /wp-admin/options-general.php?page=rocketcode_hab8142.0325.5129.70

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rocketcode_hab
    • > Notice in wp-content/plugins/hide-admin-bar-by-rocketcode/rocketcode_HAB.php+139
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hide-admin-bar-by-rocketcode/rocketcode_HAB.php:34

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: The official readme.txt might help

hide-admin-bar-by-rocketcode/rocketcode_HAB.php 92% from 13 tests

The primary PHP file in "Hide Admin Bar by RocketCode" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hide-admin-bar-by-rocketcode.php" instead of "rocketcode_HAB.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin117 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1288117

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin