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
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.01MB] [CPU: ▼5.73ms] Passed 4 tests
Analyzing server-side resources used by Sticky add to cart for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 35.00 ▼1.23 |
Dashboard /wp-admin | 3.31 ▼0.04 | 47.64 ▼8.79 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.11 ▼1.49 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 83.64 ▼11.42 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 37.27 ▲0.45 |
Server storage [IO: ▲0.57MB] [DB: ▲0.07MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
wsac_optionsframework |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Sticky add to cart for WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,819 ▲73 | 13.87 ▼0.37 | 1.74 ▲0.03 | 39.65 ▼4.95 |
Dashboard /wp-admin | 2,198 ▲20 | 5.64 ▼0.02 | 85.90 ▼17.10 | 37.31 ▼6.42 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.00 ▼0.04 | 40.66 ▲0.40 | 37.30 ▼3.46 |
Add New Post /wp-admin/post-new.php | 1,527 ▲1 | 22.92 ▲0.02 | 631.47 ▲25.99 | 64.42 ▼24.83 |
Media Library /wp-admin/upload.php | 1,400 ▲3 | 4.17 ▼0.14 | 98.83 ▼8.28 | 41.78 ▼3.21 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- wsac_optionsframework
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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/sticky-add-to-cart-for-woocommerce/inc/options-framework.php
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sticky-add-to-cart-for-woocommerce/inc/options.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sticky-add-to-cart-for-woocommerce/inc/includes/class-options-sanitization.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 86% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: woocommerce, add to cart, sticky add to cart, woocommerce sticky bar
sticky-add-to-cart-for-woocommerce/woocommerce-sticky-add-cart.php 69% from 13 tests
Analyzing the main PHP file in "Sticky add to cart for WooCommerce" version 1.7
You should first fix the following items:
- Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sticky-add-to-cart-for-woocommerce.php" instead of "woocommerce-sticky-add-cart.php")
- 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
- Domain Path: Please prefix the domain path with a forward slash character ("/languages")
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 detected8,775 lines of code in 27 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 6 | 1,666 | 577 | 5,607 |
PHP | 12 | 448 | 529 | 1,862 |
CSS | 8 | 79 | 18 | 1,176 |
SVG | 1 | 0 | 1 | 130 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 27.29 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 100.00 |
Average method complexity | 5.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 97.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 37 | |
▷ Static methods | 5 | 13.51% |
▷ Public methods | 37 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 30 | |
▷ Named functions | 30 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 8 | |
▷ Global constants | 7 | 87.50% |
▷ Class constants | 1 | 12.50% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
inc/assets/images/check_flat/default.png | 2.96KB | 1.57KB | ▼ 47.12% |
inc/assets/img/btn-down.png | 2.41KB | 1.11KB | ▼ 53.89% |
inc/assets/img/controls.png | 2.19KB | 0.95KB | ▼ 56.49% |
inc/assets/images/controls.png | 2.19KB | 0.95KB | ▼ 56.49% |
inc/assets/images/btn-up.png | 2.41KB | 1.10KB | ▼ 54.16% |