68% woo-stripe-payment

Code Review | Payment Plugins for Stripe WooCommerce

WordPress plugin Payment Plugins for Stripe WooCommerce scored68%from 54 tests.

About plugin

  • Plugin page: woo-stripe-payment
  • Plugin version: 3.3.52
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 23, 2019
  • Latest release: Nov 22, 2023
  • Number of updates: 279
  • Update frequency: every 5.6 days
  • Top authors: mr.clayton (100%)

Code review

54 tests

User reviews

226 reviews

Install metrics

100,000+ active /2,514,067 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.58MB] [CPU: ▼0.79ms] Passed 4 tests

This is a short check of server-side resources used by Payment Plugins for Stripe WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.4944.02 ▲2.69
Dashboard /wp-admin3.91 ▲0.6047.36 ▼3.20
Posts /wp-admin/edit.php4.02 ▲0.6649.26 ▼1.25
Add New Post /wp-admin/post-new.php6.51 ▲0.6295.04 ▲0.06
Media Library /wp-admin/upload.php3.83 ▲0.6037.22 ▲1.24

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Payment Plugins for Stripe WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.18 ▲0.311.85 ▲0.0838.99 ▼5.48
Dashboard /wp-admin2,195 ▲175.56 ▼0.0795.27 ▼22.3443.17 ▼5.44
Posts /wp-admin/edit.php2,100 ▼32.02 ▼0.0140.18 ▲0.2438.69 ▲3.52
Add New Post /wp-admin/post-new.php1,526 ▼1423.36 ▲0.17652.51 ▲19.2864.54 ▲12.57
Media Library /wp-admin/upload.php1,403 ▼04.26 ▼0.0097.21 ▼0.3943.83 ▼1.30

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • stripe_wc_version
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% 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 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
Almost there! Just fix the following items
  • 16× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/woo-stripe-payment/templates/mini-cart/payment-request.php
    • > /wp-content/plugins/woo-stripe-payment/templates/product/payment-request.php
    • > /wp-content/plugins/woo-stripe-payment/templates/cart/applepay.php
    • > /wp-content/plugins/woo-stripe-payment/templates/checkout/googlepay.php
    • > /wp-content/plugins/woo-stripe-payment/templates/product/googlepay.php
    • > /wp-content/plugins/woo-stripe-payment/vendor/stripe/stripe-php/build.php
    • > /wp-content/plugins/woo-stripe-payment/templates/mini-cart/googlepay.php
    • > /wp-content/plugins/woo-stripe-payment/templates/card-icons.php
    • > /wp-content/plugins/woo-stripe-payment/templates/checkout/applepay.php
    • > /wp-content/plugins/woo-stripe-payment/templates/product/applepay.php
  • 370× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/woo-stripe-payment/vendor/stripe/stripe-php/lib/Treasury/FinancialAccountFeatures.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/woo-stripe-payment/templates/checkout/blik.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function is_custom_form_active() on null in wp-content/plugins/woo-stripe-payment/templates/checkout/credit-card.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/woo-stripe-payment/vendor/stripe/stripe-php/lib/Issuing/Authorization.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/woo-stripe-payment/vendor/stripe/stripe-php/lib/SubscriptionItem.php:22
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/woo-stripe-payment/includes/admin/views/html-description.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_option() on null in wp-content/plugins/woo-stripe-payment/templates/checkout/klarna-v2.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/woo-stripe-payment/vendor/stripe/stripe-php/lib/Apps/Secret.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentPlugins\\Blocks\\Stripe\\Payments\\AbstractStripeLocalPayment' not found in wp-content/plugins/woo-stripe-payment/packages/blocks/src/Payments/Gateways/KonbiniPayment.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/woo-stripe-payment/vendor/stripe/stripe-php/lib/Service/Treasury/TransactionService.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: klarna, stripe, google pay, apple pay, sofort...

woo-stripe-payment/stripe-payments.php 85% from 13 tests

The entry point to "Payment Plugins for Stripe WooCommerce" version 3.3.52 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-stripe-payment.php" instead of "stripe-payments.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "3.0.0")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
These items require your attention
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/woo-stripe-payment/vendor/stripe/stripe-php/data/ca-certificates.crt
46,378 lines of code in 820 files:
LanguageFilesBlank linesComment linesLines of code
PHP5755,77816,74628,633
JavaScript1491,19451110,517
CSS1663633,070
Markdown378401,501
SVG5317131,373
Sass191641997
XML200140
JSON200118
make110029

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.46
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces72
Interfaces9
Traits18
Classes446
▷ Abstract classes235.16%
▷ Concrete classes42394.84%
▷ Final classes00.00%
Methods2,112
▷ Static methods35216.67%
▷ Public methods1,85787.93%
▷ Protected methods984.64%
▷ Private methods1577.43%
Functions177
▷ Named functions7542.37%
▷ Anonymous functions10257.63%
Constants1,051
▷ Global constants60.57%
▷ Class constants1,04599.43%
▷ Public constants1,045100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected