94% admin-topbar-visibility

Code Review | Admin Topbar Visibility

WordPress plugin Admin Topbar Visibility scored 94% from 54 tests.

About plugin

  • Plugin page: admin-topbar-visi...
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.8.2
  • WordPress version: 5.9.2
  • First release: Jul 22, 2021
  • Latest release: Nov 24, 2021
  • Number of updates: 4
  • Update frequency: every 36.5 days
  • Top authors: maciejcc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 189 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Admin Topbar Visibility
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0253.84 ▲5.15
Dashboard /wp-admin3.43 ▲0.0235.18 ▲1.49
Posts /wp-admin/edit.php3.66 ▲0.0236.96 ▼0.33
Add New Post /wp-admin/post-new.php6.90 ▼0.0793.30 ▼1,172.94
Media Library /wp-admin/upload.php3.32 ▲0.0224.15 ▼2.33

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Admin Topbar Visibility
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,801 ▲5915.96 ▼0.046.19 ▼0.162.11 ▼0.07
Dashboard /wp-admin2,898 ▲446.25 ▲0.03118.40 ▼15.30159.11 ▼2.50
Posts /wp-admin/edit.php2,711 ▲543.23 ▲0.0065.21 ▼0.31134.53 ▼9.74
Add New Post /wp-admin/post-new.php1,674 ▼3716.06 ▼6.44407.53 ▼21.55156.63 ▲5.63
Media Library /wp-admin/upload.php1,718 ▲205.54 ▲0.01134.57 ▼10.68182.38 ▼4.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
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 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-topbar-visibility/inc/settings/settings.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/admin-topbar-visibility/public/public.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: topbar, admin, bar

admin-topbar-visibility/admin-topbar-visibility.php Passed 13 tests

The principal PHP file in "Admin Topbar Visibility" v. 1.2 is loaded by WordPress automatically on each request
83 characters long description:
Allows you to hide / show / auto-hide the topbar appearing on the Site when logged.

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
Success! There were no dangerous files found in this plugin98 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.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