70% woocommerce-gateway-stripe

Code Review | WooCommerce Stripe Payment Gateway

WordPress plugin WooCommerce Stripe Payment Gateway scored70%from 54 tests.

About plugin

  • Plugin page: woocommerce-gatew...
  • Plugin version: 7.7.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 25, 2016
  • Latest release: Nov 9, 2023
  • Number of updates: 204
  • Update frequency: every 13.4 days
  • Top authors: royho (50.98%)automattic (23.53%)woothemes (21.08%)bor0 (2.45%)mikejolley (2.45%)

Code review

54 tests

User reviews

152 reviews

Install metrics

900,000+ active /29,768,681 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.04ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Stripe Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.52 ▲2.57
Dashboard /wp-admin3.42 ▲0.1145.66 ▼4.73
Posts /wp-admin/edit.php3.53 ▲0.1847.58 ▲0.14
Add New Post /wp-admin/post-new.php6.00 ▲0.1179.22 ▼10.13
Media Library /wp-admin/upload.php3.34 ▲0.1135.54 ▲4.86

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Stripe Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3514.34 ▼0.031.70 ▼0.0446.49 ▲5.04
Dashboard /wp-admin2,202 ▲315.60 ▲0.0682.87 ▼22.1039.28 ▼4.45
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0137.66 ▲1.5435.87 ▲1.89
Add New Post /wp-admin/post-new.php1,533 ▼323.23 ▲0.14693.11 ▼19.0065.60 ▲4.04
Media Library /wp-admin/upload.php1,407 ▲44.33 ▲0.1298.07 ▼4.6140.37 ▼2.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Error in wp-content/plugins/woocommerce-gateway-stripe/woocommerce-gateway-stripe.php+731
    Uncaught Error: Class 'WC_Stripe_Inbox_Notes' not found in wp-content/plugins/woocommerce-gateway-stripe/woocommerce-gateway-stripe.php:731
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): wcstripe_deactivated()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(816): do_action()
  • This plugin has failed uninstalling correctly, leaving 160 files (2.63MB) in the plugin directory
    • (new file) assets/css/stripe-styles.scss
    • (new file) assets/images/alipay.svg
    • (new file) assets/css/stripe-link.css
    • (new file) assets/images/amex.svg
    • (new file) assets/css/stripe-styles.css.map
    • (new file) assets/css/stripe-link.css.map
    • (new file) SECURITY.md
    • (new file) assets/css/stripe-styles.css
    • (new file) apple-developer-merchantid-domain-association
    • (new file) assets/css/stripe-link.scss
    • ...
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • widget_recent-comments
    • woocommerce_inbox_variant_assignment
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

woocommerce-gateway-stripe/woocommerce-gateway-stripe.php Passed 13 tests

The main file in "WooCommerce Stripe Payment Gateway" v. 7.7.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
53 characters long description:
Take credit card payments on your store using Stripe.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin18,255 lines of code in 154 files:
LanguageFilesBlank linesComment linesLines of code
PHP1093,5307,58516,192
JavaScript133324841,751
Sass2336245
Markdown215025
CSS70021
SVG210021

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity29.94
▷ Minimum class complexity1.00
▷ Maximum class complexity281.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits3
Classes80
▷ Abstract classes56.25%
▷ Concrete classes7593.75%
▷ Final classes11.33%
Methods831
▷ Static methods8810.59%
▷ Public methods72787.48%
▷ Protected methods333.97%
▷ Private methods718.54%
Functions18
▷ Named functions738.89%
▷ Anonymous functions1161.11%
Constants102
▷ Global constants1615.69%
▷ Class constants8684.31%
▷ Public constants86100.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