84% toggle-toolbar

Code Review | Toggle Toolbar

WordPress plugin Toggle Toolbar scored84%from 54 tests.

About plugin

  • Plugin page: toggle-toolbar
  • Plugin version: 1601...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.1-5.3
  • WordPress version: 6.3.1
  • First release: Jan 27, 2016
  • Latest release: Jan 4, 2020
  • Number of updates: 10
  • Update frequency: every 144.0 days
  • Top authors: conjur3r (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,385 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.96ms] Passed 4 tests

This is a short check of server-side resources used by Toggle Toolbar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.81 ▼1.86
Dashboard /wp-admin3.31 ▲0.0047.75 ▼3.80
Posts /wp-admin/edit.php3.36 ▲0.0042.48 ▼3.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.64 ▼14.21
Media Library /wp-admin/upload.php3.23 ▲0.0033.74 ▲0.99

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Toggle Toolbar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.66 ▼0.702.07 ▲0.1140.18 ▼3.86
Dashboard /wp-admin2,203 ▲155.85 ▼0.0599.13 ▼31.4142.09 ▼6.82
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0136.64 ▲0.3232.79 ▲1.54
Add New Post /wp-admin/post-new.php1,514 ▼1917.72 ▼5.51702.38 ▲30.8654.12 ▲4.32
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0397.74 ▲2.0542.02 ▲1.23

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toggle-toolbar/toggle-toolbar.php:30

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
3 plugin tags: toggle, admin bar, toolbar

toggle-toolbar/toggle-toolbar.php 92% from 13 tests

"Toggle Toolbar" version 1601...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "1601...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin12 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP172312

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code1.50
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%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin