84% easy-options-redirect-to-checkout-per-product-wc

Code Review | Easy Options Redirect to Checkout per product for WooCommerce

WordPress plugin Easy Options Redirect to Checkout per product for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: easy-options-redi...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.9.3
  • WordPress version: 6.3.1
  • First release: Nov 12, 2020
  • Latest release: May 19, 2022
  • Number of updates: 6
  • Update frequency: every 92.3 days
  • Top authors: jsherk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /802 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
Install script ran successfully

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

Server-side resources used by Easy Options Redirect to Checkout per product for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.35 ▼3.68
Dashboard /wp-admin3.32 ▲0.0151.70 ▲5.19
Posts /wp-admin/edit.php3.37 ▲0.0150.24 ▲0.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.41 ▼4.75
Media Library /wp-admin/upload.php3.24 ▲0.0137.73 ▲4.20
Easy Options Redirect to Checkout per product WC /wp-admin/options-general.php?page=easy-options-redirect-to-checkout-per-product-wc3.2130.13

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Options Redirect to Checkout per product for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼0.991.78 ▼0.6939.78 ▼10.38
Dashboard /wp-admin2,213 ▲314.86 ▼1.04110.98 ▲1.8841.57 ▼1.60
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0440.72 ▼0.6634.96 ▼3.88
Add New Post /wp-admin/post-new.php1,541 ▲2023.27 ▼0.05672.87 ▲31.8056.97 ▲7.12
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.0196.87 ▼5.7141.75 ▼1.62
Easy Options Redirect to Checkout per product WC /wp-admin/options-general.php?page=easy-options-redirect-to-checkout-per-product-wc7562.0524.5839.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-options-redirect-to-checkout-per-product-wc/easy-options-redirect-to-checkout-per-product-wc.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: woocommerce, per product, skip cart, skip to checkout, redirect to checkout...

easy-options-redirect-to-checkout-per-product-wc/easy-options-redirect-to-checkout-per-product-wc.php 92% from 13 tests

The principal PHP file in "Easy Options Redirect to Checkout per product for WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 203 characters long)

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
Good job! No executable or dangerous file extensions detected127 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13932127

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.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dbut.png13.46KB6.06KB▼ 55.01%
stars-small.png1.50KB1.51KB0.00%
dbut-small.png5.33KB2.67KB▼ 49.92%