83% subscriptionflow-integration-for-woocommerce

Code Review | SubscriptionFlow Integration for WooCommerce

WordPress plugin SubscriptionFlow Integration for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: subscriptionflow-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 30, 2023
  • Latest release: Oct 3, 2023
  • Number of updates: 5
  • Update frequency: every 50.0 days
  • Top authors: appssf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /375 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Server-side resources used by SubscriptionFlow Integration for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.56 ▼2.41
Dashboard /wp-admin3.32 ▲0.0146.26 ▼3.85
Posts /wp-admin/edit.php3.37 ▲0.0149.48 ▲0.21
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.34 ▲0.55
Media Library /wp-admin/upload.php3.24 ▲0.0136.17 ▼2.49

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for SubscriptionFlow Integration for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲3914.19 ▼0.401.53 ▼0.0937.53 ▼3.87
Dashboard /wp-admin2,195 ▲185.58 ▼0.0882.36 ▼15.5040.91 ▼2.92
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0438.78 ▲1.9136.05 ▲2.47
Add New Post /wp-admin/post-new.php1,536 ▼123.21 ▲0.04668.65 ▼28.2358.61 ▲3.87
Media Library /wp-admin/upload.php1,394 ▼34.16 ▼0.0392.67 ▼26.1544.17 ▼2.11

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subscriptionflow-integration-for-woocommerce/front-end/wc-sf-add-checkout.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subscriptionflow-integration-for-woocommerce/front-end/wc-sf-customer-route.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subscriptionflow-integration-for-woocommerce/front-end/wc-sf-product-detail-actions.php:9

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
No plugin tags provided

subscriptionflow-integration-for-woocommerce/class-wc-sf-integration-demo.php 69% from 13 tests

Analyzing the main PHP file in "SubscriptionFlow Integration for WooCommerce" version 1.0.1
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("subscriptionflow-integration-for-woocommerce.php" instead of "class-wc-sf-integration-demo.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 198 characters long)
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("5.6" instead of "7.2")

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 plugin1,163 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP106402751,071
JavaScript1382460
CSS11032

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity19.20
▷ Minimum class complexity7.00
▷ Maximum class complexity41.00
Average method complexity5.14
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods22
▷ Static methods1254.55%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants2
▷ Global constants2100.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