78% woo-sticky-product-bar

Code Review | Sticky Product Add to Cart and Checkout Bar for WooCommerce

WordPress plugin Sticky Product Add to Cart and Checkout Bar for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: woo-sticky-produc...
  • Plugin version: 1.0.46
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Mar 11, 2018
  • Latest release: Nov 11, 2023
  • Number of updates: 115
  • Update frequency: every 18.0 days
  • Top authors: oneteamsoftware (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active /14,989 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.15ms] Passed 4 tests

This is a short check of server-side resources used by Sticky Product Add to Cart and Checkout Bar for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.04 ▼4.31
Dashboard /wp-admin3.37 ▲0.0647.45 ▼2.25
Posts /wp-admin/edit.php3.48 ▲0.1248.18 ▲0.16
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.34 ▼0.97
Media Library /wp-admin/upload.php3.29 ▲0.0634.51 ▼1.08

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Sticky Product Add to Cart and Checkout Bar for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4114.40 ▲0.051.84 ▼0.0041.87 ▼2.84
Dashboard /wp-admin2,205 ▲255.54 ▼0.1289.00 ▼5.7339.16 ▼4.63
Posts /wp-admin/edit.php2,114 ▲142.01 ▲0.0640.21 ▼3.5537.20 ▼2.72
Add New Post /wp-admin/post-new.php1,539 ▲1223.48 ▲0.46675.95 ▼25.8355.44 ▼5.88
Media Library /wp-admin/upload.php1,416 ▲134.16 ▼0.0297.49 ▼2.3942.89 ▼3.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/cart-bar.php
    • > /wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/checkout-bar.php
  • 25× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/cart-bar.php on line 21
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/checkout-bar.php on line 26
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/cart-bar.php on line 6
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/cart-bar.php on line 3
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/cart-bar.php on line 13
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/checkout-bar.php on line 26
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/checkout-bar.php on line 34
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/checkout-bar.php on line 11
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/checkout-bar.php on line 13
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/woo-sticky-product-bar/templates/wc-sticky-product-bar/cart-bar.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
You can take inspiration from this readme.txt

woo-sticky-product-bar/wc-sticky-product-bar.php 85% from 13 tests

The principal PHP file in "Sticky Product Add to Cart and Checkout Bar for WooCommerce" v. 1.0.46 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-sticky-product-bar.php" instead of "wc-sticky-product-bar.php")

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 plugin2,154 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP81611141,603
JavaScript47820276
CSS5490275

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity18.67
▷ Minimum class complexity4.00
▷ Maximum class complexity36.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods1965.52%
▷ Protected methods1034.48%
▷ 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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/1TeamSoftware-logo.png14.55KB4.50KB▼ 69.05%
assets/images/1TeamSoftware-icon.png0.59KB0.75KB0.00%