78% hide-wp-front-admin-bar

Code Review | Hide WP Front Admin Bar

WordPress plugin Hide WP Front Admin Bar scored78%from 54 tests.

About plugin

  • Plugin page: hide-wp-front-adm...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2017
  • Latest release: Jun 18, 2021
  • Number of updates: 14
  • Update frequency: every 109.5 days
  • Top authors: pradeepsinghweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,213 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Hide WP Front Admin Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0544.13 ▲9.70
Dashboard /wp-admin3.32 ▲0.0148.05 ▲2.09
Posts /wp-admin/edit.php3.37 ▲0.0146.09 ▲1.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.85 ▼7.40
Media Library /wp-admin/upload.php3.24 ▲0.0134.24 ▼0.29
Hide WP Admin Bar /wp-admin/options-general.php?page=hide-wp-front-admin-bar3.1830.85

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
_hide_admin_bar_settings
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Hide WP Front Admin Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,619 ▼16714.34 ▼0.021.30 ▼0.5042.88 ▼0.95
Dashboard /wp-admin2,202 ▲285.58 ▲0.0296.82 ▲9.5642.63 ▲5.88
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0235.35 ▼1.8734.13 ▲0.58
Add New Post /wp-admin/post-new.php1,531 ▲523.35 ▼0.45636.78 ▼66.6952.45 ▼4.24
Media Library /wp-admin/upload.php1,401 ▲14.24 ▲0.07102.41 ▼4.9746.32 ▲0.12
Hide WP Admin Bar /wp-admin/options-general.php?page=hide-wp-front-admin-bar8682.0323.1326.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • _hide_admin_bar_settings
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=hide-wp-front-admin-bar
    • > Notice in wp-content/plugins/hide-wp-front-admin-bar/hide-wp-front-admin-bar.php+107
    Undefined index: frm-action
    • > GET request to /wp-admin/options-general.php?page=hide-wp-front-admin-bar
    • > Notice in wp-content/plugins/hide-wp-front-admin-bar/hide-wp-front-admin-bar.php+136
    Undefined index: _user_roles

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
Please 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/hide-wp-front-admin-bar/hide-wp-front-admin-bar.php:14

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 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
8 plugin tags: hide wordpress admin bar for all users, hide, hide admin bar from front end, adminbar, hide wordpress admin bar...

hide-wp-front-admin-bar/hide-wp-front-admin-bar.php 92% from 13 tests

This is the main PHP file of "Hide WP Front Admin Bar" version 1.0.1, 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:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 157 characters long)

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 plugin148 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1711148

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin