84% admin-topbar-visibility

Code Review | Admin Topbar Visibility

WordPress plugin Admin Topbar Visibility scored84%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: 6.3.1
  • 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 /454 total downloads

Benchmarks

Plugin footprint 83% from 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.02MB] [CPU: ▲0.27ms] Passed 4 tests

An overview of server-side resources used by Admin Topbar Visibility
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.72 ▼5.20
Dashboard /wp-admin3.32 ▲0.0247.06 ▲4.04
Posts /wp-admin/edit.php3.38 ▲0.0247.61 ▲2.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.74 ▼0.31
Media Library /wp-admin/upload.php3.25 ▲0.0237.89 ▲6.52

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Admin Topbar Visibility
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4414.22 ▼0.181.54 ▼0.0537.39 ▲0.26
Dashboard /wp-admin2,199 ▲345.66 ▲0.0185.40 ▼1.6241.58 ▲1.61
Posts /wp-admin/edit.php2,105 ▲162.00 ▲0.0639.94 ▲2.4434.55 ▲5.92
Add New Post /wp-admin/post-new.php1,538 ▲2218.19 ▼4.49654.09 ▼11.6865.53 ▲14.70
Media Library /wp-admin/upload.php1,404 ▲164.14 ▼0.0498.10 ▲5.0443.87 ▲3.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/admin-topbar-visibility/public/public.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-topbar-visibility/inc/settings/settings.php:16

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 issues were found

Optimizations

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: bar, admin, topbar

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 glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected98 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4412891
CSS1407

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
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
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin