78% mollie-payments-for-woocommerce

Code Review | Mollie Payments for WooCommerce

WordPress plugin Mollie Payments for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: mollie-payments-f...
  • Plugin version: 7.4.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 17, 2015
  • Latest release: Nov 6, 2023
  • Number of updates: 281
  • Update frequency: every 10.7 days
  • Top authors: carmen222 (64.06%)davdebcom (18.15%)l.vangunst (8.54%)wido (7.83%)ndijkstra (2.14%)

Code review

54 tests

User reviews

64 reviews

Install metrics

100,000+ active /2,902,269 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.28MB] [CPU: ▼6.38ms] Passed 4 tests

This is a short check of server-side resources used by Mollie Payments for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3340.55 ▲3.50
Dashboard /wp-admin3.63 ▲0.2846.36 ▼18.40
Posts /wp-admin/edit.php3.68 ▲0.3252.01 ▲4.83
Add New Post /wp-admin/post-new.php6.15 ▲0.2681.94 ▼9.77
Media Library /wp-admin/upload.php3.49 ▲0.2636.05 ▼0.85

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Mollie Payments for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲7914.27 ▲0.062.15 ▲0.5539.66 ▼0.92
Dashboard /wp-admin2,206 ▲295.56 ▼0.0484.73 ▼16.9840.71 ▼2.88
Posts /wp-admin/edit.php2,112 ▲92.13 ▲0.1840.07 ▲2.4736.78 ▲3.91
Add New Post /wp-admin/post-new.php1,539 ▲1323.50 ▲0.46691.59 ▼25.0258.24 ▲1.87
Media Library /wp-admin/upload.php1,414 ▲144.17 ▼0.0496.79 ▼16.3541.91 ▼6.15

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 55× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/profiles/create-profile.php
    • > /wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/orders/list-methods.php
    • > /wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/invoices/list-invoices.php
    • > /wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/payment-links/list-payment-links.php
    • > /wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/captures/get-capture.php
    • > /wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/payments/return.php
    • > /wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/payments/create-routed-payment-with-future-release-date.php
    • > /wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/subscriptions/update-subscription.php
    • > /wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/shipments/get-shipment.php
    • > /wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/customers/list-customer-payments.php
  • 311× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\BaseResource' not found in wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/src/Resources/Invoice.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Mollie\\WooCommerce\\Vendor\\Inpsyde\\Modularity\\Module\\ExecutableModule' not found in wp-content/plugins/mollie-payments-for-woocommerce/src/Subscription/SubscriptionModule.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\WooCommerce\\PaymentMethods\\AbstractPaymentMethod' not found in wp-content/plugins/mollie-payments-for-woocommerce/src/PaymentMethods/Bancontact.php:7
    • > PHP Warning
      require_once(wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/initialize.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/initialize.php on line 9
    • > PHP Fatal error
      Uncaught Error: Interface 'Mollie\\WooCommerce\\PaymentMethods\\PaymentMethodI' not found in wp-content/plugins/mollie-payments-for-woocommerce/src/PaymentMethods/AbstractPaymentMethod.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\WooCommerce\\PaymentMethods\\AbstractPaymentMethod' not found in wp-content/plugins/mollie-payments-for-woocommerce/src/PaymentMethods/Giftcard.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Mollie\\WooCommerce\\PaymentMethods\\InstructionStrategies\\InstructionStrategyI' not found in wp-content/plugins/mollie-payments-for-woocommerce/src/PaymentMethods/InstructionStrategies/DirectdebitInstructionStrategy.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\WooCommerce\\PaymentMethods\\AbstractPaymentMethod' not found in wp-content/plugins/mollie-payments-for-woocommerce/src/PaymentMethods/Voucher.php:7
    • > PHP Warning
      require_once(wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/mollie-payments-for-woocommerce/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

mollie-payments-for-woocommerce/mollie-payments-for-woocommerce.php 92% from 13 tests

The main PHP file in "Mollie Payments for WooCommerce" ver. 7.4.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.8" instead of "5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin26,802 lines of code in 469 files:
LanguageFilesBlank linesComment linesLines of code
PHP3835,00812,60025,452
SVG5903954
JSON500371
JavaScript170017
CSS4004
Markdown1104

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.29
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces47
Interfaces23
Traits5
Classes284
▷ Abstract classes93.17%
▷ Concrete classes27596.83%
▷ Final classes31.09%
Methods1,543
▷ Static methods442.85%
▷ Public methods1,11372.13%
▷ Protected methods36123.40%
▷ Private methods694.47%
Functions161
▷ Named functions2616.15%
▷ Anonymous functions13583.85%
Constants347
▷ Global constants30.86%
▷ Class constants34499.14%
▷ Public constants33296.51%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
65 PNG files occupy 0.18MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/PayPal_Buttons/de/checkout/pill-black.png2.49KB1.48KB▼ 40.65%
public/images/PayPal_Buttons/en/checkout/pill-white.png2.72KB1.64KB▼ 39.84%
public/images/PayPal_Buttons/nl/checkout/rounded-black.png2.32KB1.30KB▼ 43.92%
public/images/PayPal_Buttons/de/buy/pill-white.png2.83KB1.88KB▼ 33.79%
public/images/PayPal_Buttons/de/checkout/rounded-golden.png2.43KB1.53KB▼ 37.00%