Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼6.49ms] Passed 4 tests
This is a short check of server-side resources used by WooCommerce Add to Cart Custom Redirect
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 37.24 ▼4.88 |
Dashboard /wp-admin | 3.31 ▲0.00 | 44.33 ▼7.14 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 45.81 ▼3.54 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 87.77 ▼10.40 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 32.50 ▼2.38 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WooCommerce Add to Cart Custom Redirect
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲28 | 14.22 ▼0.49 | 1.67 ▼0.04 | 41.56 ▼6.69 |
Dashboard /wp-admin | 2,198 ▲21 | 5.62 ▼0.03 | 92.79 ▲4.27 | 45.54 ▲0.78 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.07 ▼0.08 | 40.84 ▲1.61 | 35.54 ▲3.52 |
Add New Post /wp-admin/post-new.php | 1,526 ▼3 | 22.99 ▼0.11 | 579.66 ▼118.38 | 55.49 ▲6.16 |
Media Library /wp-admin/upload.php | 1,394 ▼6 | 4.21 ▲0.01 | 97.57 ▲2.08 | 41.55 ▼2.56 |
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
You still need to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% 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
The following issues need your attention
- 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/woocommerce-add-to-cart-custom-redirect/templates/product-data-tab-target.php:27
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/woocommerce-add-to-cart-custom-redirect/templates/product-data-tab-upgrade-notice.php:19
- > PHP Notice
Undefined variable: key in wp-content/plugins/woocommerce-add-to-cart-custom-redirect/templates/product-data-tab-target.php on line 26
- > PHP Notice
Undefined variable: key in wp-content/plugins/woocommerce-add-to-cart-custom-redirect/templates/product-data-tab-target.php on line 15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: woocommerce, redirect
woocommerce-add-to-cart-custom-redirect/woocommerce-custom-redirect.php 85% from 13 tests
The main PHP script in "WooCommerce Add to Cart Custom Redirect" version 1.2.13 is automatically included on every request by WordPress
Please take the time to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-add-to-cart-custom-redirect.php" instead of "woocommerce-custom-redirect.php")
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
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
No dangerous file extensions were detected271 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 115 | 139 | 271 |
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.32 |
Average class complexity | 6.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 18.00 |
Average method complexity | 2.05 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 21 | |
▷ Static methods | 1 | 4.76% |
▷ Public methods | 21 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/wcr-link.png | 4.88KB | 3.02KB | ▼ 38.10% |