84% wolfen-toggle-bar

Code Review | Wolfen Toggle Bar

WordPress plugin Wolfen Toggle Bar scored 84% from 54 tests.

About plugin

  • Plugin page: wolfen-toggle-bar
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.6
  • WordPress version: 6.3.1
  • First release: Sep 16, 2016
  • Latest release: Sep 17, 2016
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: jugheadjones (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 752 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Wolfen Toggle Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.30 ▲0.15
Dashboard /wp-admin3.32 ▲0.0145.79 ▼6.59
Posts /wp-admin/edit.php3.37 ▲0.0145.59 ▼4.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.00 ▲8.40
Media Library /wp-admin/upload.php3.24 ▲0.0135.80 ▲2.39

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Wolfen Toggle Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲23513.99 ▼0.396.96 ▲5.1240.47 ▼8.31
Dashboard /wp-admin2,200 ▲155.84 ▲0.9492.22 ▼23.9539.38 ▼11.30
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0334.36 ▼2.5832.87 ▼0.50
Add New Post /wp-admin/post-new.php1,533 ▲1923.16 ▲5.59579.59 ▼91.6058.16 ▲3.60
Media Library /wp-admin/upload.php1,391 ▲64.17 ▼0.02103.02 ▲7.1644.43 ▼0.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Please take a closer look at 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/wolfen-toggle-bar/wolfen-toggle-bar.php:150

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: toggle, adminbar, toolbar

wolfen-toggle-bar/wolfen-toggle-bar.php Passed 13 tests

The entry point to "Wolfen Toggle Bar" version 0.0.2 is a PHP file that has certain tags in its header comment area
48 characters long description:
Makes the default WordPress adminbar toggleable.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected114 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12614114

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin