62% create-payment-stripe-gateway

Code Review | Create a payment request. Donation form (Stripe)

WordPress plugin Create a payment request. Donation form (Stripe) scored62%from 54 tests.

About plugin

  • Plugin page: create-payment-st...
  • Plugin version: 4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Aug 18, 2019
  • Latest release: Aug 25, 2023
  • Number of updates: 11
  • Update frequency: every 133.5 days
  • Top authors: markomaksym (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /861 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.23MB] [CPU: ▼15.97ms] Passed 4 tests

A check of server-side resources used by Create a payment request. Donation form (Stripe)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2024.26 ▼18.62
Dashboard /wp-admin3.59 ▲0.2445.10 ▼19.70
Posts /wp-admin/edit.php3.64 ▲0.2849.54 ▲0.41
Add New Post /wp-admin/post-new.php6.13 ▲0.2584.32 ▼25.96
Media Library /wp-admin/upload.php3.45 ▲0.2235.27 ▲2.40
Create Payment /wp-admin/edit.php?post_type=mxcpfc_payment3.5537.55
Add a new one /wp-admin/post-new.php?post_type=mxcpfc_payment3.6348.35
Create Payment settings /wp-admin/options-general.php?page=mxcpfc_payment_settings3.4432.38

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 337 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Create a payment request. Donation form (Stripe): an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,993 ▲24716.93 ▲2.70180.34 ▲178.5239.23 ▼4.26
Dashboard /wp-admin2,243 ▲555.02 ▼0.87113.17 ▼2.2040.06 ▼8.11
Posts /wp-admin/edit.php2,126 ▲372.03 ▲0.0539.18 ▲0.8935.01 ▲2.50
Add New Post /wp-admin/post-new.php1,555 ▲2618.40 ▲0.18634.15 ▼38.0654.61 ▼2.49
Media Library /wp-admin/upload.php1,425 ▲404.32 ▲0.1494.39 ▼7.4841.31 ▼3.81
Create Payment /wp-admin/edit.php?post_type=mxcpfc_payment1,0902.0132.1431.43
Add a new one /wp-admin/post-new.php?post_type=mxcpfc_payment3,2948.14172.9867.89
Create Payment settings /wp-admin/options-general.php?page=mxcpfc_payment_settings1,0652.0824.1131.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=mxcpfc_payment_settings
    • > Notice in wp-content/plugins/create-payment-stripe-gateway/includes/admin/views/main-page.php+120
    Undefined index: company_address
    • > GET request to /wp-admin/options-general.php?page=mxcpfc_payment_settings
    • > Notice in wp-content/plugins/create-payment-stripe-gateway/includes/admin/views/main-page.php+133
    Undefined index: company_phone
    • > GET request to /wp-admin/options-general.php?page=mxcpfc_payment_settings
    • > Notice in wp-content/plugins/create-payment-stripe-gateway/includes/admin/views/main-page.php+188
    Undefined index: invalid_request_message

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 items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/create-payment-stripe-gateway/includes/frontend/components/donation/donation-progress.php
    • > /wp-content/plugins/create-payment-stripe-gateway/includes/frontend/components/donation/donation-form.php
  • 252× 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/create-payment-stripe-gateway/includes/frontend/classes/stripe-php/lib/BillingPortal/Session.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/create-payment-stripe-gateway/includes/frontend/classes/stripe-php/lib/ApplePayDomain.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/create-payment-stripe-gateway/includes/frontend/classes/stripe-php/lib/Service/CustomerService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/create-payment-stripe-gateway/includes/frontend/classes/stripe-php/lib/Service/InvoiceService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/create-payment-stripe-gateway/includes/frontend/classes/stripe-php/lib/Person.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/create-payment-stripe-gateway/includes/frontend/classes/stripe-php/lib/Treasury/FinancialAccountFeatures.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\StripeObject' not found in wp-content/plugins/create-payment-stripe-gateway/includes/frontend/classes/stripe-php/lib/ApiResource.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/create-payment-stripe-gateway/includes/frontend/classes/stripe-php/lib/Service/ShippingRateService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/create-payment-stripe-gateway/includes/frontend/classes/stripe-php/lib/Treasury/TransactionEntry.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/create-payment-stripe-gateway/includes/frontend/classes/stripe-php/lib/Service/Treasury/FinancialAccountService.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: payment gateway, 3d secure, donation, 3ds, stripe...

create-payment-stripe-gateway/create-payment-for-client.php 92% from 13 tests

"Create a payment request. Donation form (Stripe)" version 4.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("create-payment-stripe-gateway.php" instead of "create-payment-for-client.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/create-payment-stripe-gateway/includes/frontend/classes/stripe-php/data/ca-certificates.crt
15,874 lines of code in 323 files:
LanguageFilesBlank linesComment linesLines of code
PHP3123,18712,12910,694
CSS47182,499
Markdown280701,615
SVG100685
JavaScript217478300
JSON10048
PO File18833

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.70
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity1.51
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces36
Interfaces9
Traits9
Classes286
▷ Abstract classes113.85%
▷ Concrete classes27596.15%
▷ Final classes10.36%
Methods962
▷ Static methods23124.01%
▷ Public methods87991.37%
▷ Protected methods414.26%
▷ Private methods424.37%
Functions21
▷ Named functions733.33%
▷ Anonymous functions1466.67%
Constants1,241
▷ Global constants90.73%
▷ Class constants1,23299.27%
▷ Public constants1,232100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin