68% orderforms-stripe

Code Review | Customer Portal for Stripe

WordPress plugin Customer Portal for Stripe scored68%from 54 tests.

About plugin

  • Plugin page: orderforms-stripe
  • Plugin version: 4.1.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.2-5.9.3
  • WordPress version: 6.3.1
  • First release: Jan 29, 2019
  • Latest release: Nov 28, 2022
  • Number of updates: 69
  • Update frequency: every 20.3 days
  • Top authors: orderforms (97.1%)helvetian (4.35%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,208 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.35MB] [CPU: ▼5.12ms] Passed 4 tests

An overview of server-side resources used by Customer Portal for Stripe
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3751.95 ▲8.66
Dashboard /wp-admin3.68 ▲0.3750.85 ▼14.51
Posts /wp-admin/edit.php3.73 ▲0.3754.15 ▲3.20
Add New Post /wp-admin/post-new.php6.20 ▲0.3194.64 ▼9.64
Media Library /wp-admin/upload.php3.60 ▲0.3737.73 ▲0.48
Stripe Customer Portal /wp-admin/options-general.php?page=customer-portal-for-stripe3.5137.75

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 309 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Customer Portal for Stripe
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11613.44 ▼0.9310.18 ▲8.2841.05 ▼7.54
Dashboard /wp-admin2,202 ▲255.58 ▼0.0486.76 ▼15.0438.49 ▼7.36
Posts /wp-admin/edit.php2,101 ▲11.99 ▲0.0139.61 ▼1.1038.46 ▲0.56
Add New Post /wp-admin/post-new.php1,529 ▼823.26 ▲5.10688.17 ▲32.6861.52 ▼12.91
Media Library /wp-admin/upload.php1,404 ▲44.22 ▼0.07105.96 ▼0.3346.49 ▲1.53
Stripe Customer Portal /wp-admin/options-general.php?page=customer-portal-for-stripe9913.2256.6636.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/build.php
    • > /wp-content/plugins/orderforms-stripe/public/partials/list-invoices.php
    • > /wp-content/plugins/orderforms-stripe/public/partials/public-display.php
    • > /wp-content/plugins/orderforms-stripe/public/partials/list-cards.php
    • > /wp-content/plugins/orderforms-stripe/public/partials/list-subscriptions.php
  • 223× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/lib/Product.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/lib/Service/PlanService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/lib/Service/SubscriptionScheduleService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/lib/Invoice.php:115
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/lib/BitcoinTransaction.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/lib/TaxRate.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/lib/Service/CountrySpecService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/lib/Service/TopupService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/lib/Service/SetupAttemptService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/orderforms-stripe/vendor/stripe/stripe-php/lib/Service/Terminal/ConfigurationService.php:7

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6, #7, #8 in orderforms-stripe/assets to your readme.txt
The official readme.txt might help

orderforms-stripe/customer-portal-for-stripe.php 85% from 13 tests

The primary PHP file in "Customer Portal for Stripe" version 4.1.6 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("orderforms-stripe.php" instead of "customer-portal-for-stripe.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
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/orderforms-stripe/vendor/stripe/stripe-php/data/ca-certificates.crt
11,345 lines of code in 294 files:
LanguageFilesBlank linesComment linesLines of code
PHP2792,46111,8609,733
Markdown475801,321
JSON300144
CSS3161378
XML10031
make110029
JavaScript24546
YAML1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.24
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces31
Interfaces9
Traits8
Classes243
▷ Abstract classes104.12%
▷ Concrete classes23395.88%
▷ Final classes00.00%
Methods905
▷ Static methods19721.77%
▷ Public methods81489.94%
▷ Protected methods394.31%
▷ Private methods525.75%
Functions18
▷ Named functions422.22%
▷ Anonymous functions1477.78%
Constants830
▷ Global constants60.72%
▷ Class constants82499.28%
▷ Public constants824100.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