84% hide-wp-toolbar

Code Review | Hide WP Toolbar

WordPress plugin Hide WP Toolbar scored84%from 54 tests.

About plugin

  • Plugin page: hide-wp-toolbar
  • Plugin version: 2.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Sep 10, 2012
  • Latest release: Jul 29, 2023
  • Number of updates: 49
  • Update frequency: every 81.1 days
  • Top authors: jr00ck (67.35%)deployer (34.69%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /45,147 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.48ms] Passed 4 tests

An overview of server-side resources used by Hide WP Toolbar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.93 ▼1.78
Dashboard /wp-admin3.32 ▼0.0353.83 ▼14.91
Posts /wp-admin/edit.php3.37 ▲0.0154.56 ▼0.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.50 ▼24.97
Media Library /wp-admin/upload.php3.24 ▲0.0141.86 ▲5.67

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

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

Browser metrics Passed 4 tests

Hide WP Toolbar: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.87 ▼0.398.90 ▲7.1236.23 ▼6.72
Dashboard /wp-admin2,192 ▲155.60 ▼0.0592.87 ▼4.5339.42 ▼0.37
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0347.15 ▲12.4839.08 ▲3.80
Add New Post /wp-admin/post-new.php1,526 ▼223.11 ▲0.15645.20 ▲27.7652.01 ▲2.93
Media Library /wp-admin/upload.php1,403 ▲64.23 ▲0.05101.32 ▲0.8045.26 ▼1.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix 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-wp-toolbar/hide-wp-toolbar.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

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

This is the main PHP file of "Hide WP Toolbar" version 2.6.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
131 characters long description:
The plugin adds a clickable button to the right side of the WordPress Toolbar that will show or hide the bar with nice transitions.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected152 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1484667
CSS116057
JavaScript1121128

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.20MB with 0.14MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png106.66KB40.75KB▼ 61.80%
assets/banner-772x250.png94.48KB19.87KB▼ 78.97%