77% sticky-add-to-cart-bar-for-wc

Code Review | Sticky Add To Cart Bar For WooCommerce

WordPress plugin Sticky Add To Cart Bar For WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: sticky-add-to-car...
  • Plugin version: 1.4.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2
  • WordPress version: 6.3.1
  • First release: Jun 24, 2020
  • Latest release: May 6, 2023
  • Number of updates: 17
  • Update frequency: every 61.6 days
  • Top authors: addonsplus (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /13,958 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.27MB] [CPU: ▼3.75ms] Passed 4 tests

Server-side resources used by Sticky Add To Cart Bar For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2227.83 ▼13.29
Dashboard /wp-admin3.62 ▲0.3246.91 ▼2.85
Posts /wp-admin/edit.php3.67 ▲0.3246.69 ▲1.23
Add New Post /wp-admin/post-new.php6.16 ▲0.2893.01 ▼0.08
Media Library /wp-admin/upload.php3.48 ▲0.2636.64 ▲1.92

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
woo_sticky_cart
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Sticky Add To Cart Bar For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,515 ▼23113.27 ▼1.100.72 ▼1.1318.23 ▼26.54
Dashboard /wp-admin2,259 ▲684.89 ▼0.11109.24 ▲2.9142.90 ▲2.39
Posts /wp-admin/edit.php2,138 ▲462.05 ▲0.0141.90 ▲1.1138.84 ▲6.49
Add New Post /wp-admin/post-new.php1,570 ▲5618.65 ▲1.01624.91 ▼67.6070.30 ▲15.19
Media Library /wp-admin/upload.php1,441 ▲534.27 ▲0.06102.06 ▼6.0046.63 ▲1.28

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • woo_sticky_cart

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)
Good news, no errors were detected

SRP 0% 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 fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sticky-add-to-cart-bar-for-wc/addonsplus-wsc.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/sticky-add-to-cart-bar-for-wc/templates/dashboard.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WscInc\\Base\\BaseController' not found in wp-content/plugins/sticky-add-to-cart-bar-for-wc/inc/Base/SettingsLinks.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WscInc\\Base\\BaseController' not found in wp-content/plugins/sticky-add-to-cart-bar-for-wc/inc/Base/Enqueue.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WscInc\\Base\\BaseController' not found in wp-content/plugins/sticky-add-to-cart-bar-for-wc/inc/Api/Callbacks/AdminCallbacks.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sticky-add-to-cart-bar-for-wc/templates/cart.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WscInc\\Base\\BaseController' not found in wp-content/plugins/sticky-add-to-cart-bar-for-wc/inc/Base/WooCart.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WscInc\\Base\\BaseController' not found in wp-content/plugins/sticky-add-to-cart-bar-for-wc/inc/Pages/Dashboard.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: add to cart, boost sales, sticky add to cart, woocommerce, woocommerce sticky bar

sticky-add-to-cart-bar-for-wc/addonsplus-wsc.php 69% from 13 tests

The main PHP script in "Sticky Add To Cart Bar For WooCommerce" version 1.4.6 is automatically included on every request by WordPress
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.6" instead of "4.8")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sticky-add-to-cart-bar-for-wc.php" instead of "addonsplus-wsc.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: The description should be shorter than 140 characters (currently 213 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected2,354 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP222232601,622
Sass9698657
JavaScript316771
CSS3373
JSON1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes17.14%
Methods61
▷ Static methods813.11%
▷ Public methods5996.72%
▷ Protected methods00.00%
▷ Private methods23.28%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/scripts/images/ui-icons_2e83ff_256x240.png4.57KB4.18KB▼ 8.43%
assets/scripts/images/ui-bg_glass_75_dadada_1x400.png0.32KB0.16KB▼ 50.46%
assets/scripts/images/ui-bg_glass_65_ffffff_1x400.png0.26KB0.09KB▼ 66.79%
assets/scripts/images/ui-icons_888888_256x240.png6.94KB4.18KB▼ 39.78%
assets/scripts/images/ui-bg_glass_95_fef1ec_1x400.png0.38KB0.15KB▼ 61.54%