84% disable-toolbar

Code Review | Disable Toolbar

WordPress plugin Disable Toolbar scored84%from 54 tests.

About plugin

  • Plugin page: disable-toolbar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.9
  • WordPress version: 6.3.1
  • First release: Jul 31, 2014
  • Latest release: Nov 9, 2017
  • Number of updates: 8
  • Update frequency: every 149.8 days
  • Top authors: SeventhSteel (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

3,000+ active /24,516 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Disable Toolbar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.25 ▼4.40
Dashboard /wp-admin3.32 ▲0.0245.16 ▼3.15
Posts /wp-admin/edit.php3.38 ▲0.0249.97 ▼2.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.13 ▼9.39
Media Library /wp-admin/upload.php3.25 ▲0.0234.84 ▼1.23

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Disable Toolbar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.021.62 ▼0.2042.06 ▼4.20
Dashboard /wp-admin2,209 ▲184.82 ▼1.08100.05 ▼15.5638.49 ▼8.59
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0138.16 ▲1.6834.81 ▲0.11
Add New Post /wp-admin/post-new.php1,542 ▲2218.21 ▼4.90622.97 ▼40.5358.98 ▲6.09
Media Library /wp-admin/upload.php1,388 ▼34.27 ▲0.0796.28 ▲1.7140.59 ▼2.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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)
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-toolbar/disable-toolbar.php:25

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: admin bar, toggle toolbar, hide toolbar frontend, global hide toolbar, adminbar...

disable-toolbar/disable-toolbar.php Passed 13 tests

"Disable Toolbar" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
98 characters long description:
Adds an option in Settings > General that controls who sees the WP Toolbar when viewing your site.

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
Everything looks great! No dangerous files found in this plugin57 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1352957

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods6100.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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin