84% wp-stripe-checkout

Code Review | WP Stripe Checkout

WordPress plugin WP Stripe Checkout scored84%from 54 tests.

About plugin

  • Plugin page: wp-stripe-checkout
  • Plugin version: 1.2.2.39
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Nov 2, 2016
  • Latest release: Nov 16, 2023
  • Number of updates: 100
  • Update frequency: every 25.7 days
  • Top authors: naa986 (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

3,000+ active /142,524 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.71MB] [CPU: ▲3.18ms] Passed 4 tests

Server-side resources used by WP Stripe Checkout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7042.54 ▲3.39
Dashboard /wp-admin4.06 ▲0.7658.76 ▲10.56
Posts /wp-admin/edit.php4.11 ▲0.7653.26 ▲2.75
Add New Post /wp-admin/post-new.php6.58 ▲0.6999.99 ▼1.16
Media Library /wp-admin/upload.php3.92 ▲0.6941.50 ▲7.72
Settings /wp-admin/edit.php?post_type=wpstripeco_order&page=wp-stripe-checkout-settings3.8936.27
Add-ons /wp-admin/edit.php?post_type=wpstripeco_order&page=wp-stripe-checkout-addons3.8938.59
All Orders /wp-admin/edit.php?post_type=wpstripeco_order3.9639.44
Debug /wp-admin/edit.php?post_type=wpstripeco_order&page=wp-stripe-checkout-debug3.8936.85
All Products (Deprecated) /wp-admin/edit.php?post_type=wpstripeco_product3.9637.41

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
wp_stripe_checkout_email_options
wp_stripe_checkout_db_version
can_compress_scripts
wpstripecheckout_logfile_suffix
widget_recent-comments
db_upgraded
widget_theysaidso_widget
wp_stripe_checkout_verify_front_end_nonces

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Stripe Checkout
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲7614.28 ▲0.031.74 ▲0.1538.83 ▼4.11
Dashboard /wp-admin2,237 ▲605.60 ▼0.0193.77 ▼1.0139.80 ▼0.80
Posts /wp-admin/edit.php2,142 ▲391.95 ▲0.0140.56 ▼1.4637.00 ▲0.04
Add New Post /wp-admin/post-new.php1,561 ▲3523.16 ▼0.01684.52 ▲29.1555.32 ▲4.32
Media Library /wp-admin/upload.php1,439 ▲364.22 ▼0.00115.23 ▲11.6546.11 ▼1.45
Settings /wp-admin/edit.php?post_type=wpstripeco_order&page=wp-stripe-checkout-settings1,1012.0123.0131.82
Add-ons /wp-admin/edit.php?post_type=wpstripeco_order&page=wp-stripe-checkout-addons9791.9923.6636.38
All Orders /wp-admin/edit.php?post_type=wpstripeco_order1,1341.9334.4432.06
Debug /wp-admin/edit.php?post_type=wpstripeco_order&page=wp-stripe-checkout-debug8622.1325.9327.77
All Products (Deprecated) /wp-admin/edit.php?post_type=wpstripeco_product1,1351.9030.9433.05

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 10 options in the database
    • theysaidso_admin_options
    • wp_stripe_checkout_db_version
    • wpstripecheckout_logfile_suffix
    • widget_theysaidso_widget
    • wp_stripe_checkout_verify_front_end_nonces
    • can_compress_scripts
    • wp_stripe_checkout_email_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-stripe-checkout/wp-stripe-checkout-product.php:314
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-stripe-checkout/wp-stripe-checkout-order.php:196

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
5 plugin tags: stripe, donation, ecommerce, payments, checkout

wp-stripe-checkout/main.php 85% from 13 tests

This is the main PHP file of "WP Stripe Checkout" version 1.2.2.39, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-stripe-checkout.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected3,348 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP81391493,297
CSS21151

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity58.00
▷ Minimum class complexity11.00
▷ Maximum class complexity105.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods621.43%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants1184.62%
▷ Class constants215.38%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
addons/images/wp-stripe-checkout-payment-link-email.png1.76KB0.93KB▼ 47.18%
addons/images/wp-stripe-checkout-variable-currency.png3.70KB2.87KB▼ 22.46%
addons/images/wp-stripe-checkout-variable-price.png6.46KB3.07KB▼ 52.55%
addons/images/wp-stripe-checkout-submit-type.png2.79KB1.96KB▼ 29.76%
addons/images/wp-stripe-checkout-variable-quantity.png6.32KB2.95KB▼ 53.35%