83% hide-admin-bar-or-toolbar

Code Review | Hide Admin Bar or Toolbar

WordPress plugin Hide Admin Bar or Toolbar scored83%from 54 tests.

About plugin

  • Plugin page: hide-admin-bar-or...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.4
  • WordPress version: 6.3.1
  • First release: May 16, 2020
  • Latest release: May 16, 2020
  • Number of updates: 3
  • Update frequency: every 291.3 days
  • Top authors: urmilwp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /472 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Hide Admin Bar or Toolbar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0632.65 ▼14.90
Dashboard /wp-admin3.31 ▲0.0146.46 ▼2.83
Posts /wp-admin/edit.php3.36 ▲0.0150.08 ▼1.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.79 ▼3.13
Media Library /wp-admin/upload.php3.23 ▲0.0037.31 ▲0.95

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Hide Admin Bar or Toolbar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,615 ▼14614.76 ▲0.371.30 ▼0.8138.36 ▼9.63
Dashboard /wp-admin2,195 ▲185.66 ▼0.0493.11 ▲5.1141.79 ▲1.74
Posts /wp-admin/edit.php2,100 ▲32.17 ▲0.1544.69 ▲5.9234.83 ▲1.68
Add New Post /wp-admin/post-new.php1,545 ▲1923.26 ▲5.79752.18 ▲104.5155.20 ▼2.01
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.02100.58 ▲2.1243.03 ▼3.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/hide-admin-bar-or-toolbar/hide-admin-bar-or-toolbar.php:24

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 90% 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 is a good inspiration

hide-admin-bar-or-toolbar/hide-admin-bar-or-toolbar.php 85% from 13 tests

The entry point to "Hide Admin Bar or Toolbar" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages/")
  • Description: The description should be shorter than 140 characters (currently 192 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin23 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151423

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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