84% easy-hide-admin-bar

Code Review | Easy Hide Admin Bar

WordPress plugin Easy Hide Admin Bar scored84%from 54 tests.

About plugin

  • Plugin page: easy-hide-admin-bar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Oct 12, 2021
  • Latest release: Oct 12, 2021
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: alexdee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /276 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Easy Hide Admin Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0633.65 ▼11.75
Dashboard /wp-admin3.31 ▲0.0154.13 ▲0.85
Posts /wp-admin/edit.php3.37 ▲0.0052.55 ▲2.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0096.89 ▼10.15
Media Library /wp-admin/upload.php3.24 ▲0.0039.19 ▼0.59

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Hide Admin Bar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,615 ▼14614.34 ▼0.191.40 ▼0.5840.84 ▼5.51
Dashboard /wp-admin2,198 ▲215.63 ▲0.0195.15 ▲1.9440.95 ▼2.35
Posts /wp-admin/edit.php2,103 ▼02.03 ▼0.0041.89 ▲5.5934.89 ▼1.10
Add New Post /wp-admin/post-new.php1,526 ▼023.33 ▼0.31605.91 ▼40.0864.42 ▲9.33
Media Library /wp-admin/upload.php1,397 ▼04.24 ▲0.04100.52 ▼6.4741.43 ▼8.54

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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 | 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-hide-admin-bar/hide_admin_bar.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: hide, admin bar, admin

easy-hide-admin-bar/hide_admin_bar.php 92% from 13 tests

"Easy Hide Admin Bar" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-hide-admin-bar.php" instead of "hide_admin_bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11910

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin