78% redirect-woocommerce-user-that-bought-this-product

Code Review | Redirect Woocommerce User that Bought this Product

WordPress plugin Redirect Woocommerce User that Bought this Product scored78%from 54 tests.

About plugin

  • Plugin page: redirect-woocomme...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 27, 2019
  • Latest release: Jul 27, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ahiad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /520 total downloads

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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼15.08ms] Passed 4 tests

This is a short check of server-side resources used by Redirect Woocommerce User that Bought this Product
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.46 ▼6.95
Dashboard /wp-admin3.31 ▼0.0443.94 ▼19.43
Posts /wp-admin/edit.php3.36 ▲0.0047.65 ▲1.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.02 ▼32.34
Media Library /wp-admin/upload.php3.23 ▲0.0033.61 ▼1.60

Server storage [IO: ▲0.07MB] [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
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Redirect Woocommerce User that Bought this Product
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.191.88 ▲0.1242.22 ▼2.05
Dashboard /wp-admin2,206 ▲155.84 ▼0.06106.87 ▼12.7138.68 ▼6.98
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0240.58 ▲0.7936.48 ▼0.43
Add New Post /wp-admin/post-new.php1,514 ▼2317.74 ▼0.55660.96 ▲19.5853.99 ▲1.27
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.1198.17 ▼14.7142.56 ▼0.38

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/redirect-woocommerce-user-that-bought-this-product/wcrebtp.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/redirect-woocommerce-user-that-bought-this-product/templates/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/redirect-woocommerce-user-that-bought-this-product/inc/wcrebtp-plugin-activate.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (The field in product page named "Redirection Address", where the user will be redirected if already bought this product from the product page.)
Please take inspiration from this readme.txt

redirect-woocommerce-user-that-bought-this-product/wcrebtp.php 85% from 13 tests

"Redirect Woocommerce User that Bought this Product" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("redirect-woocommerce-user-that-bought-this-product.php" instead of "wcrebtp.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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin218 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP54550137
PO File1161670
CSS10011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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
No PNG images were found in this plugin