84% remove-wp-admin-bar

Code Review | Remove WP Admin Bar

WordPress plugin Remove WP Admin Bar scored84%from 54 tests.

About plugin

  • Plugin page: remove-wp-admin-bar
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2023
  • Latest release: Nov 28, 2023
  • Number of updates: 14
  • Update frequency: every 20.4 days
  • Top authors: dhrumilk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /465 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.94ms] Passed 4 tests

Server-side resources used by Remove WP Admin Bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.76 ▼8.83
Dashboard /wp-admin3.33 ▲0.0249.88 ▲1.26
Posts /wp-admin/edit.php3.38 ▲0.0246.55 ▼1.73
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.50 ▼7.44
Media Library /wp-admin/upload.php3.25 ▲0.0232.59 ▼1.77

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
remove_wp_admin_bar_user_role
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Remove WP Admin Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4014.34 ▼0.371.62 ▼0.1237.90 ▼6.16
Dashboard /wp-admin2,204 ▲305.56 ▼0.07110.09 ▲7.5556.03 ▲11.68
Posts /wp-admin/edit.php2,112 ▲121.95 ▼0.0038.75 ▼0.7336.48 ▲0.11
Add New Post /wp-admin/post-new.php1,536 ▲122.92 ▲4.34573.32 ▼77.6169.67 ▲11.13
Media Library /wp-admin/upload.php1,412 ▲154.17 ▲0.0295.88 ▼2.7342.33 ▼0.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/remove-wp-admin-bar/remove-wp-admin-bar.php:26

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention: The official readme.txt might help

remove-wp-admin-bar/remove-wp-admin-bar.php Passed 13 tests

The main PHP script in "Remove WP Admin Bar" version 1.3 is automatically included on every request by WordPress
76 characters long description:
This plugin is useful to remove/hide admin bar based on selected user roles.

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

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions8
▷ Named functions8100.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
There were not PNG files found in your plugin