84% disable-wp-admin-bar

Code Review | Disable WP admin bar

WordPress plugin Disable WP admin bar scored84%from 54 tests.

About plugin

  • Plugin page: disable-wp-admin-bar
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Aug 23, 2022
  • Latest release: Sep 6, 2022
  • Number of updates: 3
  • Update frequency: every 4.7 days
  • Top authors: wptracer37 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /236 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Disable WP admin bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0631.87 ▼5.06
Dashboard /wp-admin3.31 ▲0.0144.96 ▼7.58
Posts /wp-admin/edit.php3.36 ▲0.0147.21 ▼2.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.06 ▼6.68
Media Library /wp-admin/upload.php3.24 ▲0.0136.66 ▲2.48
Admin Bar /wp-admin/options-general.php?page=admin-bar-settings-page3.2031.20

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Disable WP admin bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,630 ▼11613.58 ▼0.731.07 ▼0.6539.27 ▼2.39
Dashboard /wp-admin2,210 ▲195.88 ▲0.99105.14 ▲1.2243.15 ▼0.88
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0139.78 ▼4.2133.96 ▼0.73
Add New Post /wp-admin/post-new.php1,552 ▲2423.12 ▲4.95622.26 ▼40.9857.00 ▲6.92
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0695.91 ▼1.7842.35 ▼2.38
Admin Bar /wp-admin/options-general.php?page=admin-bar-settings-page7742.0524.3626.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-wp-admin-bar/disable-wp-admin-bar.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (WP admin bar is removed from the fontend of the website.)
You can take inspiration from this readme.txt

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

The main file in "Disable WP admin bar" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
82 characters long description:
This plugin disables the WordPress top admin bar from the frontend of the website.

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
Good job! No executable or dangerous file extensions detected20 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151120

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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
1 PNG file occupies 0.21MB with 0.14MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png211.13KB66.51KB▼ 68.50%