83% elvez-hide-admin-bar

Code Review | Elvez Hide Admin Bar

WordPress plugin Elvez Hide Admin Bar scored83%from 54 tests.

About plugin

  • Plugin page: elvez-hide-admin-bar
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Aug 30, 2020
  • Latest release: Aug 23, 2021
  • Number of updates: 10
  • Update frequency: every 36.1 days
  • Top authors: elvezcojp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /470 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Elvez Hide Admin Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0430.26 ▼6.88
Dashboard /wp-admin3.33 ▲0.0345.08 ▼2.47
Posts /wp-admin/edit.php3.44 ▲0.0945.20 ▼0.83
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.51 ▼5.44
Media Library /wp-admin/upload.php3.25 ▲0.0231.86 ▼1.63
Hide Admin Bar /wp-admin/admin.php?page=elvez-hide-admin-bar3.2229.39

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
plugin_name_hide_admin_bar
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Elvez Hide Admin Bar: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,738 ▼3313.94 ▼0.505.17 ▲3.3141.50 ▼0.18
Dashboard /wp-admin2,233 ▲424.85 ▼0.04118.04 ▲14.3243.06 ▲0.62
Posts /wp-admin/edit.php2,119 ▲272.02 ▲0.0039.93 ▲3.3134.76 ▲1.78
Add New Post /wp-admin/post-new.php1,542 ▲1522.99 ▼0.24597.51 ▼76.8452.43 ▲2.00
Media Library /wp-admin/upload.php1,415 ▲244.23 ▼0.1296.40 ▼1.5942.07 ▼1.87
Hide Admin Bar /wp-admin/admin.php?page=elvez-hide-admin-bar8322.0522.5226.22

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • plugin_name_hide_admin_bar
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/elvez-hide-admin-bar/public/partials/elvez-hide-admin-bar-public-display.php
    • > /wp-content/plugins/elvez-hide-admin-bar/admin/partials/elvez-hide-admin-bar-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed: The official readme.txt is a good inspiration

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

The entry point to "Elvez Hide Admin Bar" version 1.0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "5.2")
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.4" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin475 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12141584268
CSS22838204
JavaScript12273

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.43
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods310.00%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants19.09%
▷ Class constants1090.91%
▷ Public constants10100.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
No PNG files were detected