48% payment-page

Code Review | Payment Page | Best Payment Plugin for Stripe & PayPal

WordPress plugin Payment Page | Best Payment Plugin for Stripe & PayPal scored48%from 54 tests.

About plugin

  • Plugin page: payment-page
  • Plugin version: 1.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4
  • WordPress version: 6.3.1
  • First release: Oct 14, 2020
  • Latest release: Oct 26, 2023
  • Number of updates: 60
  • Update frequency: every 18.4 days
  • Top authors: brandonfire (81.67%)juanobrach (15%)victoralbala (6.67%)

Code review

54 tests

User reviews

17 reviews

Install metrics

200+ active /7,879 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.63MB] [CPU: ▲4.23ms] Passed 4 tests

A check of server-side resources used by Payment Page | Best Payment Plugin for Stripe & PayPal
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6341.95 ▲6.89
Dashboard /wp-admin3.94 ▲0.6353.64 ▲3.12
Posts /wp-admin/edit.php3.99 ▲0.6352.48 ▲6.50
Add New Post /wp-admin/post-new.php6.53 ▲0.6491.90 ▲0.40
Media Library /wp-admin/upload.php3.86 ▲0.6343.43 ▲8.40
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius4.0438.19

Server storage [IO: ▲9.29MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 815 new files
Database: 5 new tables, 11 new options
New tables
wp_payment_page_stripe_prices
wp_payment_page_stripe_customers
wp_payment_page_payments
wp_payment_page_stripe_products
wp_payment_page_log
New WordPress options
db_upgraded
fs_debug_mode
widget_recent-comments
can_compress_scripts
payment_page_migration_version
theysaidso_admin_options
payment_page_settings
widget_recent-posts
fs_active_plugins
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Payment Page | Best Payment Plugin for Stripe & PayPal
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,031 ▲27016.69 ▲2.3310.29 ▲8.4431.74 ▼8.90
Dashboard /wp-admin2,286 ▲1066.22 ▲0.5688.18 ▼9.6640.48 ▼3.90
Posts /wp-admin/edit.php2,205 ▲1053.00 ▲1.0043.96 ▲6.9231.21 ▼2.83
Add New Post /wp-admin/post-new.php1,568 ▲3923.34 ▲0.24659.90 ▲6.8854.83 ▼3.01
Media Library /wp-admin/upload.php1,494 ▲944.76 ▲0.65104.65 ▼8.1946.94 ▼1.67
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,1352.6631.2526.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/payment-page/lib/freemius/wordpress-sdk/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie tables detected upon uninstall: 5 tables
    • wp_payment_page_stripe_prices
    • wp_payment_page_payments
    • wp_payment_page_stripe_customers
    • wp_payment_page_log
    • wp_payment_page_stripe_products
  • The uninstall procedure has failed, leaving 11 options in the database
    • payment_page_migration_version
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • fs_accounts
    • widget_recent-comments
    • can_compress_scripts
    • fs_active_plugins
    • payment_page_settings
    • fs_debug_mode
    • widget_recent-posts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/payment-page/templates/shortcode-payment-success.php
  • 379× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/payment-page/lib/paypal-sdk/paypal/rest-api-sdk-php/lib/PayPal/Api/MerchantInfo.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\ApiErrorException' not found in wp-content/plugins/payment-page/lib/stripe/lib/Exception/IdempotencyException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/payment-page/lib/paypal-sdk/paypal/rest-api-sdk-php/lib/PayPal/Api/OverrideChargeModel.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalResourceModel' not found in wp-content/plugins/payment-page/lib/paypal-sdk/paypal/rest-api-sdk-php/lib/PayPal/Api/Refund.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/payment-page/lib/stripe/lib/Service/Checkout/SessionService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/payment-page/lib/stripe/lib/Mandate.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/payment-page/lib/paypal-sdk/paypal/rest-api-sdk-php/lib/PayPal/Api/PaymentOptions.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalResourceModel' not found in wp-content/plugins/payment-page/lib/paypal-sdk/paypal/rest-api-sdk-php/lib/PayPal/Api/Sale.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/payment-page/lib/stripe/lib/Invoice.php:107
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/payment-page/lib/stripe/lib/SingletonApiResource.php:8

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 issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (32 tag instead of maximum 10)
The official readme.txt is a good inspiration

payment-page/payment-page.php Passed 13 tests

The principal PHP file in "Payment Page | Best Payment Plugin for Stripe & PayPal" v. 1.3 is loaded by WordPress automatically on each request
127 characters long description:
Payment Page is the most powerful way to accept online payments. Connect your payment gateway, choose a template, and get paid!

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Almost there! Just fix the following issues
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/payment-page/lib/stripe/data/ca-certificates.crt
73,491 lines of code in 724 files:
LanguageFilesBlank linesComment linesLines of code
PHP61514,14941,84961,443
JavaScript351,0661563,934
Sass1653302,802
CSS246832,234
PO File24946401,168
SVG1202789
HTML10570534
Markdown4880351
JSON300156
XML311080

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity12.39
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces52
Interfaces14
Traits9
Classes506
▷ Abstract classes183.56%
▷ Concrete classes48896.44%
▷ Final classes00.00%
Methods4,355
▷ Static methods50811.66%
▷ Public methods3,83187.97%
▷ Protected methods541.24%
▷ Private methods47010.79%
Functions212
▷ Named functions17582.55%
▷ Anonymous functions3717.45%
Constants898
▷ Global constants13114.59%
▷ Class constants76785.41%
▷ Public constants767100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
24 PNG files occupy 0.15MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/freemius/wordpress-sdk/includes/freemius-pricing/178afa6030e76635dbe835e111d2c507.png5.88KB3.01KB▼ 48.84%
lib/freemius/wordpress-sdk/includes/freemius-pricing/27b5a722a5553d9de0170325267fccec.png6.35KB3.38KB▼ 46.76%
interface/app/component/admin-dashboard/img/logo.png2.27KB2.35KB0.00%
lib/freemius/wordpress-sdk/includes/freemius-pricing/5480ed23b199531a8cbc05924f26952b.png7.09KB2.94KB▼ 58.58%
lib/freemius/wordpress-sdk/includes/freemius-pricing/f3aac72a8e63997d6bb888f816457e9b.png5.90KB3.16KB▼ 46.47%