90% edd-add-to-cart-redirect

Code Review | EDD Add To Cart Redirect

WordPress plugin EDD Add To Cart Redirect scored90%from 54 tests.

About plugin

  • Plugin page: edd-add-to-cart-r...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 25, 2014
  • Latest release: Jul 27, 2014
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: sumobi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,384 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by EDD Add To Cart Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.18 ▼6.48
Dashboard /wp-admin3.31 ▲0.0046.97 ▼0.12
Posts /wp-admin/edit.php3.36 ▲0.0046.81 ▼1.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.95 ▼2.57
Media Library /wp-admin/upload.php3.23 ▲0.0039.02 ▲2.45

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

EDD Add To Cart Redirect: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.131.71 ▼0.2338.76 ▼5.94
Dashboard /wp-admin2,206 ▲185.02 ▲0.17111.84 ▼2.7741.79 ▼6.18
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0535.57 ▼3.7830.93 ▼4.99
Add New Post /wp-admin/post-new.php1,537 ▲423.14 ▲0.08664.36 ▲46.3759.92 ▼2.22
Media Library /wp-admin/upload.php1,382 ▼94.22 ▼0.00104.30 ▲10.6845.00 ▲4.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Everything seems fine, however this is by no means an exhaustive test

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: andrew munro, digital downloads, edd, e-downloads, redirect...

edd-add-to-cart-redirect/edd-add-to-cart-redirect.php Passed 13 tests

This is the main PHP file of "EDD Add To Cart Redirect" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
84 characters long description:
Redirects customer to another post/page/download after adding a download to the cart

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin212 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP170181212

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods18
▷ Static methods211.11%
▷ Public methods1688.89%
▷ Protected methods00.00%
▷ Private methods211.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin