89% redirect-on-add-to-cart-for-woocommerce

Code Review | Redirect on Add To Cart For WooCommerce

WordPress plugin Redirect on Add To Cart For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: redirect-on-add-t...
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 24, 2022
  • Latest release: Sep 16, 2023
  • Number of updates: 13
  • Update frequency: every 43.8 days
  • Top authors: wpxqw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,003 total downloads


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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.74ms] Passed 4 tests

An overview of server-side resources used by Redirect on Add To Cart For WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.78 ▼6.10
Dashboard /wp-admin3.31 ▲0.0041.15 ▼5.21
Posts /wp-admin/edit.php3.36 ▲0.0041.64 ▼8.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.07 ▲8.57
Media Library /wp-admin/upload.php3.23 ▲0.0034.84 ▲1.01

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Redirect on Add To Cart For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.171.66 ▼0.0737.80 ▼1.70
Dashboard /wp-admin2,209 ▲204.83 ▼0.09102.78 ▼8.1038.44 ▼4.29
Posts /wp-admin/edit.php2,086 ▼32.01 ▲0.0239.22 ▼2.6335.20 ▼2.14
Add New Post /wp-admin/post-new.php1,519 ▼2323.11 ▲5.00596.99 ▼42.3657.03 ▼8.11
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.01101.29 ▲2.0944.20 ▼0.08

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected


Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

redirect-on-add-to-cart-for-woocommerce/ms-wc-cart-addons.php 69% from 13 tests

"Redirect on Add To Cart For WooCommerce" version 1.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 162 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("redirect-on-add-to-cart-for-woocommerce.php" instead of "ms-wc-cart-addons.php")
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("5.6" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin541 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.00
▷ Minimum class complexity3.00
▷ Maximum class complexity25.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes240.00%
▷ Static methods510.87%
▷ Public methods4495.65%
▷ Protected methods00.00%
▷ Private methods24.35%
▷ Named functions133.33%
▷ Anonymous functions266.67%
▷ Global constants19.09%
▷ Class constants1090.91%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin