90% storefront-top-bar

Code Review | Storefront Top Bar

WordPress plugin Storefront Top Bar scored90%from 54 tests.

About plugin

  • Plugin page: storefront-top-bar
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2015
  • Latest release: Feb 13, 2023
  • Number of updates: 13
  • Update frequency: every 224.9 days
  • Top authors: Wooassist (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

3,000+ active /76,313 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by Storefront Top Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.67 ▼5.89
Dashboard /wp-admin3.31 ▲0.0051.10 ▼0.89
Posts /wp-admin/edit.php3.36 ▲0.0048.40 ▲3.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.44 ▼2.42
Media Library /wp-admin/upload.php3.23 ▲0.0035.09 ▲1.05

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
storefront-top-bar-version
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Storefront Top Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.45 ▲0.081.68 ▼0.3240.62 ▼9.44
Dashboard /wp-admin2,209 ▲215.85 ▲0.9898.21 ▼21.3240.66 ▼4.78
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0441.01 ▲0.3435.45 ▼0.94
Add New Post /wp-admin/post-new.php1,536 ▲1523.25 ▲0.25648.05 ▼49.0653.65 ▼3.76
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0296.89 ▼5.8442.79 ▼1.43

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • storefront-top-bar-version
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: logo, storefront, customizer, widgets, top bar...

storefront-top-bar/storefront-top-bar.php 92% from 13 tests

"Storefront Top Bar" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "4.0.0")

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
Success! There were no dangerous files found in this plugin405 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP273158288
CSS110117

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods17
▷ Static methods15.88%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected