78% enweby-custom-redirection-after-add-to-cart

Code Review | Custom Redirection after Add to Cart for Woo Stores

WordPress plugin Custom Redirection after Add to Cart for Woo Stores scored78%from 54 tests.

About plugin

  • Plugin page: enweby-custom-red...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2
  • WordPress version: 6.3.1
  • First release: Aug 12, 2021
  • Latest release: May 26, 2023
  • Number of updates: 20
  • Update frequency: every 32.7 days
  • Top authors: enweby (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /433 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.74ms] Passed 4 tests

A check of server-side resources used by Custom Redirection after Add to Cart for Woo Stores
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.38 ▼6.68
Dashboard /wp-admin3.38 ▲0.0847.80 ▼2.38
Posts /wp-admin/edit.php3.49 ▲0.1451.35 ▲3.30
Add New Post /wp-admin/post-new.php5.98 ▲0.1088.07 ▼0.33
Media Library /wp-admin/upload.php3.30 ▲0.0834.66 ▼1.56

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Custom Redirection after Add to Cart for Woo Stores: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14114.03 ▼0.727.13 ▲5.1540.06 ▼2.64
Dashboard /wp-admin2,213 ▲255.86 ▼0.03106.54 ▼0.3538.49 ▼5.49
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0639.22 ▼0.7035.12 ▼3.21
Add New Post /wp-admin/post-new.php1,527 ▼118.39 ▲0.31604.34 ▼43.6063.53 ▲14.33
Media Library /wp-admin/upload.php1,389 ▲44.16 ▼0.0998.21 ▼4.9742.88 ▲1.21

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

Smoke tests 50% from 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 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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/enweby-custom-redirection-after-add-to-cart/public/partials/enweby-custom-redirection-after-add-to-cart-public-display.php
    • > /wp-content/plugins/enweby-custom-redirection-after-add-to-cart/admin/partials/enweby-custom-redirection-after-add-to-cart-admin-display.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Unterminated comment starting line 2 in wp-content/plugins/enweby-custom-redirection-after-add-to-cart/index.php on line 2
    • > PHP Warning
      Unterminated comment starting line 2 in wp-content/plugins/enweby-custom-redirection-after-add-to-cart/admin/index.php on line 2
    • > PHP Warning
      Unterminated comment starting line 2 in wp-content/plugins/enweby-custom-redirection-after-add-to-cart/public/index.php on line 2
    • > PHP Warning
      Unterminated comment starting line 2 in wp-content/plugins/enweby-custom-redirection-after-add-to-cart/includes/index.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
4 plugin tags: add to cart redirect, custom redirection to checkout, redirect to checkout, woocommece add to cart redirect

enweby-custom-redirection-after-add-to-cart/enweby-custom-redirection-after-add-to-cart.php 92% from 13 tests

"Custom Redirection after Add to Cart for Woo Stores" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 192 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin295 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12138609289
JavaScript26706
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.43
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin