94% admin-bar-autohider

Code Review | Admin bar AutoHider

WordPress plugin Admin bar AutoHider scored 94% 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: 5.9.2
  • 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 / 609 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼292.16ms] 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.53 ▲0.0191.14 ▲40.41
Dashboard /wp-admin3.42 ▲0.0133.15 ▼1.55
Posts /wp-admin/edit.php3.65 ▲0.0138.10 ▼1.02
Add New Post /wp-admin/post-new.php6.89 ▼0.0891.95 ▼1,164.96
Media Library /wp-admin/upload.php3.30 ▲0.0124.18 ▼1.09
Admin bar AutoHider /wp-admin/options-general.php?page=admin-bar-autohider/admin_bar_autohider.php3.2724.07

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Admin bar AutoHider: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,779 ▲3316.25 ▲0.505.83 ▼0.182.10 ▼0.33
Dashboard /wp-admin2,891 ▲336.12 ▼0.05125.79 ▼12.43162.47 ▼81.41
Posts /wp-admin/edit.php2,693 ▲53.23 ▼0.0065.40 ▲2.01143.67 ▼2.38
Add New Post /wp-admin/post-new.php1,664 ▼4215.81 ▼4.84428.96 ▼9.39148.90 ▼7.18
Media Library /wp-admin/upload.php1,700 ▲25.44 ▼0.07148.77 ▲8.76205.11 ▼50.67
Admin bar AutoHider /wp-admin/options-general.php?page=admin-bar-autohider/admin_bar_autohider.php1,0992.4254.04138.89

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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 add_action() in wp-content/plugins/admin-bar-autohider/admin_bar_autohider.php:39

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: bar, admin, position, auto, hide

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

The main PHP script in "Admin bar AutoHider" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal 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 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected259 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11528129
JavaScript13897
CSS11033

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.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin