Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
- This plugin did not install gracefully
- > Notice in wp-content/plugins/add-to-cart-button-for-woocommerce/includes/class-addtocart.php+204
Trying to access array offset on value of type bool
Server metrics [RAM: ▲1.84MB] [CPU: ▲2.74ms] Passed 4 tests
A check of server-side resources used by Add to Cart Button Pro for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.97 ▲0.50 | 34.00 ▼11.60 |
Dashboard /wp-admin | 5.62 ▲2.32 | 66.73 ▲18.20 |
Posts /wp-admin/edit.php | 5.77 ▲2.41 | 63.02 ▲8.29 |
Add New Post /wp-admin/post-new.php | 8.03 ▲2.14 | 97.43 ▲0.71 |
Media Library /wp-admin/upload.php | 5.61 ▲2.38 | 48.43 ▲13.54 |
Add to Cart Button /wp-admin/edit.php?post_type=add_to_cart_cpt | 3.64 | 33.00 |
Server storage [IO: ▲1.80MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 79 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
_addtocart_options |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
Add to Cart Button Pro for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,726 ▼20 | 16.26 ▲1.88 | 0.50 ▼1.25 | 18.44 ▼25.44 |
Dashboard /wp-admin | 2,467 ▲285 | 6.69 ▲1.81 | 142.56 ▲33.25 | 44.06 ▲3.29 |
Posts /wp-admin/edit.php | 2,375 ▲286 | 4.07 ▲2.03 | 59.27 ▲17.58 | 32.63 ▼3.14 |
Add New Post /wp-admin/post-new.php | 1,634 ▲106 | 24.09 ▲5.71 | 657.93 ▲33.50 | 48.25 ▼10.45 |
Media Library /wp-admin/upload.php | 1,514 ▲126 | 5.38 ▲1.22 | 86.24 ▼16.09 | 43.89 ▼4.63 |
Add to Cart Button /wp-admin/edit.php?post_type=add_to_cart_cpt | 28 | 0.44 | 0.08 | 3.86 |
Advanced Settings /wp-admin/edit.php?post_type=add_to_cart_cpt#tab=4 | 28 | 0.44 | 0.22 | 4.18 |
Sticky Button on Product Page /wp-admin/edit.php?post_type=add_to_cart_cpt#tab=3 | 28 | 0.44 | 0.09 | 3.59 |
Button on Shop page /wp-admin/edit.php?post_type=add_to_cart_cpt#tab=1 | 28 | 0.44 | 0.06 | 4.17 |
Button on Product Page /wp-admin/edit.php?post_type=add_to_cart_cpt#tab=2 | 28 | 0.44 | 0.08 | 3.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- The uninstall procedure has failed, leaving 7 options in the database
- widget_theysaidso_widget
- widget_recent-posts
- _addtocart_options
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
- > GET request to /wp-admin/edit.php?post_type=add_to_cart_cpt
- > Network (severe)
wp-admin/edit.php?post_type=add_to_cart_cpt - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- > GET request to /wp-admin/edit.php?post_type=add_to_cart_cpt#tab=4
- > Network (severe)
wp-admin/edit.php?post_type=add_to_cart_cpt#tab=4 - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- > GET request to /wp-admin/edit.php?post_type=add_to_cart_cpt#tab=3
- > Network (severe)
wp-admin/edit.php?post_type=add_to_cart_cpt#tab=3 - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- > GET request to /wp-admin/edit.php?post_type=add_to_cart_cpt#tab=1
- > Network (severe)
wp-admin/edit.php?post_type=add_to_cart_cpt#tab=1 - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- > GET request to /wp-admin/edit.php?post_type=add_to_cart_cpt#tab=2
- > Network (severe)
wp-admin/edit.php?post_type=add_to_cart_cpt#tab=2 - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Optimizations
Plugin configuration 93% 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: sticky add to cart, add to cart button, custom add to cart button woocommerce, woocommerce, add to cart
add-to-cart-button-for-woocommerce/wk-add-to-cart-button-pro.php 85% from 13 tests
Analyzing the main PHP file in "Add to Cart Button Pro for WooCommerce" version 1.1.0
It is important to fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add-to-cart-button-for-woocommerce.php" instead of "wk-add-to-cart-button-pro.php")
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
Success! There were no dangerous files found in this plugin15,162 lines of code in 64 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 49 | 1,248 | 1,197 | 4,798 |
CSS | 7 | 288 | 462 | 3,913 |
JavaScript | 5 | 1,192 | 334 | 3,778 |
SVG | 3 | 0 | 0 | 2,673 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.63 |
Average class complexity | 21.63 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 121.00 |
Average method complexity | 6.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 52.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 35 | |
▷ Abstract classes | 2 | 5.71% |
▷ Concrete classes | 33 | 94.29% |
▷ Final classes | 0 | 0.00% |
Methods | 132 | |
▷ Static methods | 25 | 18.94% |
▷ Public methods | 125 | 94.70% |
▷ Protected methods | 1 | 0.76% |
▷ Private methods | 6 | 4.55% |
Functions | 29 | |
▷ Named functions | 28 | 96.55% |
▷ Anonymous functions | 1 | 3.45% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/atc-framework/assets/images/checkerboard.png | 2.29KB | 2.54KB | 0.00% |