84% bury-admin-bar

Code Review | Hide Admin Bar

WordPress plugin Hide Admin Bar scored84%from 54 tests.

About plugin

  • Plugin page: bury-admin-bar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 16, 2018
  • Latest release: Apr 16, 2018
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: iticiti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /576 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼2.84ms] Passed 4 tests

An overview of server-side resources used by Hide Admin Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0643.20 ▲5.52
Dashboard /wp-admin3.31 ▼0.0344.74 ▼15.70
Posts /wp-admin/edit.php3.36 ▲0.0046.15 ▼0.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.33 ▲1.72
Media Library /wp-admin/upload.php3.24 ▲0.0037.09 ▲3.45

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

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

Browser metrics Passed 4 tests

Hide Admin Bar: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,626 ▼12013.22 ▼1.343.98 ▲2.2345.54 ▲2.10
Dashboard /wp-admin2,203 ▲144.88 ▼1.05137.87 ▲32.9343.95 ▲3.65
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0446.83 ▲10.8635.28 ▲0.84
Add New Post /wp-admin/post-new.php1,543 ▲2918.23 ▲0.46590.43 ▼76.8150.65 ▼7.33
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0396.68 ▲2.4845.68 ▲1.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bury-admin-bar/bury_admin_bar.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: admin, hidden, admin bar

bury-admin-bar/bury_admin_bar.php 92% from 13 tests

The principal PHP file in "Hide Admin Bar" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bury-admin-bar.php" instead of "bury_admin_bar.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
Good job! No executable or dangerous file extensions detected10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11810

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin