Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼3.05ms] Passed 4 tests
This is a short check of server-side resources used by WooCommerce Add To Cart Redirection
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 37.59 ▼2.64 |
Dashboard /wp-admin | 3.31 ▲0.00 | 43.58 ▼5.04 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 44.44 ▲1.48 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 81.60 ▼5.99 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 33.66 ▲2.89 |
Server storage [IO: ▲0.25MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for WooCommerce Add To Cart Redirection
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲43 | 13.23 ▼1.19 | 1.79 ▼0.51 | 43.56 ▼3.21 |
Dashboard /wp-admin | 2,206 ▲21 | 4.86 ▼0.12 | 102.54 ▼15.59 | 41.60 ▼0.97 |
Posts /wp-admin/edit.php | 2,086 ▼6 | 2.00 ▼0.04 | 37.04 ▼3.07 | 32.81 ▼4.53 |
Add New Post /wp-admin/post-new.php | 1,519 ▼26 | 23.12 ▼0.12 | 659.19 ▼13.17 | 56.05 ▲7.00 |
Media Library /wp-admin/upload.php | 1,385 ▼3 | 4.19 ▲0.03 | 96.00 ▼7.44 | 41.38 ▼5.59 |
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
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 50% 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 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
- 3× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/wc-add-to-cart-redirection/tests/bootstrap.php
- > /wp-content/plugins/wc-add-to-cart-redirection/wc-add-to-cart-redirection.php
- > /wp-content/plugins/wc-add-to-cart-redirection/index.php
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wc-add-to-cart-redirection/tests/test-sample.php:11
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: add to cart redirect, redirect to checkout, woocommerc, add to cart redirection, woocommerce redirection...
wc-add-to-cart-redirection/wc-add-to-cart-redirection.php Passed 13 tests
"WooCommerce Add To Cart Redirection" version 0.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
86 characters long description:
Redirect user to any selected page upon product added to cart. You can choose any page
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 detected366 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 57 | 104 | 167 |
Bourne Shell | 1 | 21 | 11 | 123 |
JavaScript | 1 | 9 | 1 | 46 |
XML | 1 | 0 | 0 | 16 |
JSON | 1 | 1 | 0 | 11 |
Markdown | 1 | 1 | 0 | 3 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 4.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 1.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 1 | 50.00% |
Methods | 9 | |
▷ Static methods | 1 | 11.11% |
▷ Public methods | 9 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 8 | |
▷ Named functions | 8 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.23MB with 0.17MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.png | 237.82KB | 68.65KB | ▼ 71.13% |