84% admin-bar-autohider

Code Review | Admin bar AutoHider

WordPress plugin Admin bar AutoHider scored 84% from 54 tests.

About plugin

  • Plugin page: admin-bar-autohider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5
  • WordPress version: 6.3.1
  • First release: Apr 26, 2016
  • Latest release: Apr 27, 2016
  • Number of updates: 4
  • Update frequency: every 2.8 days
  • Top authors: wadadanet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.77ms] Passed 4 tests

Analyzing server-side resources used by Admin bar AutoHider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.76 ▲0.16
Dashboard /wp-admin3.33 ▲0.0345.24 ▼4.56
Posts /wp-admin/edit.php3.38 ▲0.0347.58 ▲0.93
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.69 ▼15.39
Media Library /wp-admin/upload.php3.25 ▲0.0334.86 ▲0.73
Admin bar AutoHider /wp-admin/options-general.php?page=admin-bar-autohider/admin_bar_autohider.php3.2232.18

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Admin bar AutoHider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.17 ▼1.231.81 ▼0.3641.65 ▼9.26
Dashboard /wp-admin2,213 ▲255.86 ▲0.9697.02 ▼16.6838.01 ▼12.67
Posts /wp-admin/edit.php2,093 ▲72.16 ▲0.1540.11 ▲5.0836.23 ▼1.18
Add New Post /wp-admin/post-new.php1,517 ▼817.87 ▼5.28682.32 ▲3.7953.49 ▼3.45
Media Library /wp-admin/upload.php1,395 ▲134.20 ▼0.0097.62 ▼3.8741.91 ▼2.63
Admin bar AutoHider /wp-admin/options-general.php?page=admin-bar-autohider/admin_bar_autohider.php8492.0423.6529.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-bar-autohider/admin_bar_autohider.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

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
5 plugin tags: position, auto, admin, bar, hide

admin-bar-autohider/admin_bar_autohider.php 92% from 13 tests

This is the main PHP file of "Admin bar AutoHider" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("admin-bar-autohider.php" instead of "admin_bar_autohider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin259 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11528129
JavaScript13897
CSS11033

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin