67% wp-stripe-express

Code Review | Stripe Express

WordPress plugin Stripe Express scored67%from 54 tests.

About plugin

  • Plugin page: wp-stripe-express
  • Plugin version: 1.14.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: Nov 12, 2023
  • Number of updates: 67
  • Update frequency: every 16.2 days
  • Top authors: itstripe (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /4,847 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲7.15MB] [CPU: ▲34.07ms] 50% from 4 tests

This is a short check of server-side resources used by Stripe Express
Please fix the following
  • RAM: Try to keep total memory usage under 10MB (currently 10.97MB on /wp-admin/admin.php?page=freemius)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 7.15MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /10.95 ▲7.4974.38 ▲32.96
Dashboard /wp-admin10.97 ▲7.6790.83 ▲40.72
Posts /wp-admin/edit.php10.98 ▲7.6295.05 ▲43.25
Add New Post /wp-admin/post-new.php11.72 ▲5.84118.43 ▲22.75
Media Library /wp-admin/upload.php10.97 ▲7.7577.85 ▲39.84
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius10.9776.98

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 617 new files
Database: 1 new table, 9 new options
New tables
wp_stripe_express_elements
New WordPress options
widget_theysaidso_widget
db_upgraded
fs_active_plugins
widget_recent-posts
theysaidso_admin_options
fs_debug_mode
fs_accounts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Stripe Express: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7414.70 ▲0.361.61 ▼0.2728.44 ▼16.08
Dashboard /wp-admin2,242 ▲655.54 ▼0.1188.76 ▼4.8045.73 ▲3.76
Posts /wp-admin/edit.php2,150 ▲472.04 ▲0.0840.17 ▼2.9838.69 ▲1.68
Add New Post /wp-admin/post-new.php1,541 ▲1521.93 ▼1.34660.25 ▼53.7654.85 ▼2.28
Media Library /wp-admin/upload.php1,447 ▲474.18 ▲0.02100.84 ▼1.0844.65 ▲1.57
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1111.6628.4427.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • fs_active_plugins
    • widget_theysaidso_widget
    • widget_recent-posts
    • fs_debug_mode
    • fs_accounts
    • can_compress_scripts

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-stripe-express/templates/confirmation.php
    • > /wp-content/plugins/wp-stripe-express/vendor/stripe-php/update_certs.php
    • > /wp-content/plugins/wp-stripe-express/vendor/stripe-php/build.php
  • 321× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wp-stripe-express/vendor/stripe-php/lib/Service/ReviewService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wp-stripe-express/vendor/stripe-php/lib/Capability.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\StripeObject' not found in wp-content/plugins/wp-stripe-express/vendor/stripe-php/lib/ApiResource.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wp-stripe-express/vendor/stripe-php/lib/Service/TaxRateService.php:7
    • > PHP Notice
      Undefined variable: placeholder in wp-content/plugins/wp-stripe-express/templates/confirmation.php on line 73
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wp-stripe-express/vendor/stripe-php/lib/CustomerBalanceTransaction.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractServiceFactory' not found in wp-content/plugins/wp-stripe-express/vendor/stripe-php/lib/Service/BillingPortal/BillingPortalServiceFactory.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'TomorrowIdeas\\Plaid\\Resources\\AbstractResource' not found in wp-content/plugins/wp-stripe-express/vendor/tomorrow-ideas/plaid-sdk-php/src/Resources/Institutions.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'TomorrowIdeas\\Plaid\\Tests\\TestCase' not found in wp-content/plugins/wp-stripe-express/vendor/tomorrow-ideas/plaid-sdk-php/tests/TransactionsTest.php:12
    • > PHP Notice
      Undefined variable: placeholder in wp-content/plugins/wp-stripe-express/templates/confirmation.php on line 69

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: contact form 7, wechat pay, credit card, alipay, ach...

wp-stripe-express/stripe-express.php 77% from 13 tests

Analyzing the main PHP file in "Stripe Express" version 1.14.3
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 169 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-stripe-express.php" instead of "stripe-express.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/wp-stripe-express/vendor/stripe-php/data/ca-certificates.crt
53,592 lines of code in 546 files:
LanguageFilesBlank linesComment linesLines of code
PHP49312,16431,65850,979
Markdown1189801,507
JSON800605
JavaScript638156245
XML5131125
CSS152148
YAML510044
make313039

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity14.33
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces42
Interfaces26
Traits7
Classes377
▷ Abstract classes174.51%
▷ Concrete classes36095.49%
▷ Final classes00.00%
Methods2,866
▷ Static methods40414.10%
▷ Public methods2,26378.96%
▷ Protected methods652.27%
▷ Private methods53818.77%
Functions135
▷ Named functions10174.81%
▷ Anonymous functions3425.19%
Constants947
▷ Global constants11011.62%
▷ Class constants83788.38%
▷ Public constants837100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%