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.27MB] [CPU: ▼3.80ms] Passed 4 tests
Server-side resources used by Ultimate Custom Add To Cart Button (Ajax) For WooCommerce by Binary Carpenter
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.73 ▲0.27 | 38.34 ▼1.18 |
Dashboard /wp-admin | 3.58 ▲0.27 | 47.38 ▼4.18 |
Posts /wp-admin/edit.php | 3.69 ▲0.33 | 51.39 ▲4.28 |
Add New Post /wp-admin/post-new.php | 6.16 ▲0.27 | 93.90 ▼10.93 |
Media Library /wp-admin/upload.php | 3.50 ▲0.27 | 35.28 ▲1.10 |
Server storage [IO: ▲3.86MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Ultimate Custom Add To Cart Button (Ajax) For WooCommerce by Binary Carpenter
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲28 | 14.14 ▼0.24 | 1.72 ▼0.03 | 38.03 ▼5.66 |
Dashboard /wp-admin | 2,195 ▲18 | 5.61 ▲0.02 | 91.43 ▼13.26 | 40.86 ▼1.74 |
Posts /wp-admin/edit.php | 2,079 ▼24 | 1.98 ▲0.05 | 39.54 ▲4.51 | 34.67 ▼3.08 |
Add New Post /wp-admin/post-new.php | 1,526 ▼10 | 23.31 ▼0.07 | 679.49 ▲70.45 | 48.37 ▼7.20 |
Media Library /wp-admin/upload.php | 1,400 ▲6 | 4.16 ▼0.05 | 98.20 ▼1.93 | 42.42 ▼2.51 |
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
These items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- 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)
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/custom-add-to-cart-button-for-woocommerce/ui/download-styles.php
- 4× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function BinaryCarpenter\\BC_ATC\\get_option() in wp-content/plugins/custom-add-to-cart-button-for-woocommerce/inc/BC_ATC_Options.php:19
- > PHP Fatal error
Uncaught Error: Class 'BinaryCarpenter\\BC_ATC\\Config' not found in wp-content/plugins/custom-add-to-cart-button-for-woocommerce/ui/main-ui.php:24
- > PHP Fatal error
Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/custom-add-to-cart-button-for-woocommerce/ui/create-style.php:10
- > PHP Fatal error
Uncaught Error: Class 'BinaryCarpenter\\BC_ATC\\Config' not found in wp-content/plugins/custom-add-to-cart-button-for-woocommerce/ui/manage-buttons.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 86% 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: custom add to cart button, add to cart button, ajax add to cart button, add to cart, woocommerce
custom-add-to-cart-button-for-woocommerce/index.php 69% from 13 tests
The main PHP script in "Ultimate Custom Add To Cart Button (Ajax) For WooCommerce by Binary Carpenter" version 1.222.13 is automatically included on every request by WordPress
You should first fix the following items:
- Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "5.0.0")
- Requires PHP: Required version must match the one declared in readme.txt ("5.6" instead of "7.0")
- 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
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-add-to-cart-button-for-woocommerce.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected2,553 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 598 | 197 | 2,356 |
SVG | 1 | 30 | 0 | 105 |
Sass | 2 | 19 | 1 | 88 |
CSS | 2 | 0 | 0 | 2 |
JavaScript | 2 | 0 | 2 | 2 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.54 |
Average class complexity | 27.14 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 162.00 |
Average method complexity | 5.31 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 64.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 43 | |
▷ Static methods | 10 | 23.26% |
▷ Public methods | 40 | 93.02% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 6.98% |
Functions | 3 | |
▷ Named functions | 1 | 33.33% |
▷ Anonymous functions | 2 | 66.67% |
Constants | 17 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 17 | 100.00% |
▷ Public constants | 17 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
bundle/css/images/subtract.png | 14.39KB | 0.16KB | ▼ 98.91% |
bundle/css/images/owl.video.play.png | 4.86KB | 2.74KB | ▼ 43.61% |
bundle/css/images/next_button.png | 16.98KB | 1.68KB | ▼ 90.09% |
bundle/css/images/bc-atc-qty-style-01.png | 6.59KB | 1.28KB | ▼ 80.61% |
bundle/css/images/bc-atc-qty-style-06.png | 2.28KB | 1.04KB | ▼ 54.37% |