84% sbl-admin-bar

Code Review | SBL Admin Bar

WordPress plugin SBL Admin Bar scored84%from 54 tests.

About plugin

  • Plugin page: sbl-admin-bar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.6
  • WordPress version: 6.3.1
  • First release: Dec 12, 2020
  • Latest release: Dec 12, 2020
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: lienhard (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /398 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by SBL Admin Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0237.32 ▼2.47
Dashboard /wp-admin3.35 ▲0.0451.98 ▲6.91
Posts /wp-admin/edit.php3.40 ▲0.0448.73 ▼1.04
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.91 ▼2.25
Media Library /wp-admin/upload.php3.27 ▲0.0434.15 ▼0.53
SBL Admin Bar /wp-admin/options-general.php?page=sbl-admin-bar3.2431.00

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SBL Admin Bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,628 ▼13314.24 ▼0.111.85 ▲0.2337.38 ▼7.75
Dashboard /wp-admin2,199 ▲195.57 ▼0.0382.45 ▼9.1537.41 ▼6.99
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0240.31 ▼0.2035.04 ▼0.53
Add New Post /wp-admin/post-new.php1,537 ▲1118.18 ▼4.97608.44 ▼76.3469.83 ▲17.92
Media Library /wp-admin/upload.php1,407 ▲74.26 ▲0.0693.97 ▼0.9839.99 ▼6.26
SBL Admin Bar /wp-admin/options-general.php?page=sbl-admin-bar8662.1325.6324.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sbl-admin-bar/sbl-admin-bar.php:12

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

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: toolbar, hotkeys, adminbar, admin bar, hotkey

sbl-admin-bar/sbl-admin-bar.php 92% from 13 tests

The main PHP file in "SBL Admin Bar" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 167 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected225 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP18412182
JavaScript127143

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants9
▷ Global constants9100.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
No PNG images were found in this plugin