68% pymntpl-paypal-woocommerce

Code Review | Payment Plugins for PayPal WooCommerce

WordPress plugin Payment Plugins for PayPal WooCommerce scored68%from 54 tests.

About plugin

  • Plugin page: pymntpl-paypal-wo...
  • Plugin version: 1.0.40
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: May 4, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 100
  • Update frequency: every 7.6 days
  • Top authors: mr.clayton (100%)

Code review

54 tests

User reviews

62 reviews

Install metrics

40,000+ active /308,668 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.40MB] [CPU: ▲2.93ms] Passed 4 tests

A check of server-side resources used by Payment Plugins for PayPal WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4145.65 ▲4.86
Dashboard /wp-admin3.71 ▲0.4048.14 ▲2.29
Posts /wp-admin/edit.php3.76 ▲0.4060.33 ▲11.53
Add New Post /wp-admin/post-new.php6.29 ▲0.4092.92 ▲4.76
Media Library /wp-admin/upload.php3.63 ▲0.4035.06 ▼0.20

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 472 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
wc_ppcp_version
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Payment Plugins for PayPal WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.20 ▼0.151.81 ▲0.1944.34 ▲2.52
Dashboard /wp-admin2,192 ▲125.66 ▲0.0291.41 ▲1.7138.97 ▼0.70
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0835.56 ▼0.0930.33 ▼1.63
Add New Post /wp-admin/post-new.php1,526 ▼023.52 ▲0.26693.36 ▲65.5466.46 ▲10.34
Media Library /wp-admin/upload.php1,403 ▲34.15 ▲0.0099.95 ▲4.3142.67 ▲1.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • wc_ppcp_version
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/pymntpl-paypal-woocommerce/templates/cart/paypal.php
    • > /wp-content/plugins/pymntpl-paypal-woocommerce/templates/product/paypal.php
    • > /wp-content/plugins/pymntpl-paypal-woocommerce/templates/minicart/payment-methods.php
  • 174× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentPlugins\\PayPalSDK\\AbstractObject' not found in wp-content/plugins/pymntpl-paypal-woocommerce/vendor/paymentplugins/paypal-php-sdk/src/Item.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'PaymentPlugins\\WooCommerce\\PPCP\\Integrations\\PluginIntegrationType' not found in wp-content/plugins/pymntpl-paypal-woocommerce/packages/woofunnels/src/Upsell/WooFunnelsIntegration.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentPlugins\\PayPalSDK\\AbstractObject' not found in wp-content/plugins/pymntpl-paypal-woocommerce/vendor/paymentplugins/paypal-php-sdk/src/Name.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentPlugins\\WooCommerce\\PPCP\\Factories\\AbstractFactory' not found in wp-content/plugins/pymntpl-paypal-woocommerce/src/Factories/ShippingOptionsFactory.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/pymntpl-paypal-woocommerce/packages/blocks/src/Payments/Gateways/PayPalExpressGateway.php:5
    • > PHP Notice
      Undefined variable: below_add_to_cart in wp-content/plugins/pymntpl-paypal-woocommerce/templates/cart/payment-methods.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentPlugins\\WooCommerce\\PPCP\\Factories\\AbstractFactory' not found in wp-content/plugins/pymntpl-paypal-woocommerce/src/Factories/OrderFactory.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentPlugins\\PayPalSDK\\Service\\BaseService' not found in wp-content/plugins/pymntpl-paypal-woocommerce/vendor/paymentplugins/paypal-php-sdk/src/Service/BillingAgreementService.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentPlugins\\WooCommerce\\PPCP\\Rest\\Routes\\AbstractRoute' not found in wp-content/plugins/pymntpl-paypal-woocommerce/src/Rest/Routes/BillingAgreementToken.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PaymentPlugins\\WooCommerce\\PPCP\\Shortcodes\\AbstractShortCode' not found in wp-content/plugins/pymntpl-paypal-woocommerce/src/Shortcodes/AbstractPayLaterMessage.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: paylater, venmo, paypal, credit cards

pymntpl-paypal-woocommerce/pymntpl-paypal-woocommerce.php Passed 13 tests

The principal PHP file in "Payment Plugins for PayPal WooCommerce" v. 1.0.40 is loaded by WordPress automatically on each request
39 characters long description:
Accept PayPal on your WooCommerce site.

Code Analysis 5% 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
Please fix the following items
  • Do not distribute dangerous files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/pymntpl-paypal-woocommerce/vendor/paymentplugins/paypal-php-sdk/ca-certificates.crt
20,802 lines of code in 423 files:
LanguageFilesBlank linesComment linesLines of code
PHP2983,5643,27915,386
JavaScript925221324,069
Sass821901,072
SVG801191
JSON20055
XML10014
CSS130013
Markdown1002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.79
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces49
Interfaces5
Traits2
Classes236
▷ Abstract classes187.63%
▷ Concrete classes21892.37%
▷ Final classes00.00%
Methods1,429
▷ Static methods634.41%
▷ Public methods1,24487.05%
▷ Protected methods674.69%
▷ Private methods1188.26%
Functions122
▷ Named functions10.82%
▷ Anonymous functions12199.18%
Constants126
▷ Global constants00.00%
▷ Class constants126100.00%
▷ Public constants126100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin