78% edd-mollie-gateway

Code Review | Payment Gateway using Mollie for Easy Digital Downloads

WordPress plugin Payment Gateway using Mollie for Easy Digital Downloads scored78%from 54 tests.

About plugin

  • Plugin page: edd-mollie-gateway
  • Plugin version: 3.2.8
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Apr 9, 2017
  • Latest release: Nov 8, 2023
  • Number of updates: 49
  • Update frequency: every 49.1 days
  • Top authors: SdeWijs (51.02%)wpovernight (36.73%)pomegranate (16.33%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /6,793 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.80ms] Passed 4 tests

A check of server-side resources used by Payment Gateway using Mollie for Easy Digital Downloads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.84 ▼4.16
Dashboard /wp-admin3.33 ▼0.0245.43 ▼14.21
Posts /wp-admin/edit.php3.38 ▲0.0249.23 ▲1.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.13 ▼20.75
Media Library /wp-admin/upload.php3.25 ▲0.0233.30 ▼0.06

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 438 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Payment Gateway using Mollie for Easy Digital Downloads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.47 ▲0.101.77 ▲0.1342.41 ▼0.12
Dashboard /wp-admin2,195 ▲185.48 ▼0.1582.34 ▼6.3342.45 ▲2.84
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0139.99 ▲4.5037.10 ▲0.10
Add New Post /wp-admin/post-new.php1,526 ▼023.30 ▲0.07657.42 ▼26.5251.37 ▼1.60
Media Library /wp-admin/upload.php1,397 ▼04.24 ▲0.0398.31 ▼1.0241.63 ▼2.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 50× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/payments/create-routed-payment.php
    • > /wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/customers/update-customer.php
    • > /wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/payments/list-payments.php
    • > /wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/orders/refund-order-partially.php
    • > /wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/payments/webhook.php
    • > /wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/payment-links/create-payment-link.php
    • > /wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/settlements/list-settlements.php
    • > /wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/payments/create-ideal-payment.php
    • > /wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/shipments/update-shipment.php
    • > /wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/orders/refund-order-completely.php
  • 249× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/initialize.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\CursorCollection' not found in wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/src/Resources/CustomerCollection.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/edd-mollie-gateway/vendor/guzzlehttp/promises/src/Promise.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\BaseResource' not found in wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/src/Resources/Customer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\BaseCollection' not found in wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/src/Resources/OrderLineCollection.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Endpoints\\CollectionEndpointAbstract' not found in wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/src/Endpoints/PaymentLinkEndpoint.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/initialize.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/edd-mollie-gateway/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:7
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/payments/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/examples/payments/create-routed-payment-with-future-release-date.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Endpoints\\CollectionEndpointAbstract' not found in wp-content/plugins/edd-mollie-gateway/vendor/mollie/mollie-api-php/src/Endpoints/OrderRefundEndpoint.php:9

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

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

edd-mollie-gateway/edd-mollie-gateway.php Passed 13 tests

"Payment Gateway using Mollie for Easy Digital Downloads" version 3.2.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
69 characters long description:
Accept payments via Mollie in your Easy Digital Downloads (EDD) store

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected43,152 lines of code in 416 files:
LanguageFilesBlank linesComment linesLines of code
PHP3244,70313,59336,453
Markdown151,22703,636
JSON12001,329
SVG5404868
PO File1247499558
CSS1120129
YAML522391
JavaScript28169
Dockerfile18010
make1409

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.75
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces20
Interfaces17
Traits2
Classes217
▷ Abstract classes83.69%
▷ Concrete classes20996.31%
▷ Final classes2511.96%
Methods1,490
▷ Static methods18312.28%
▷ Public methods1,16378.05%
▷ Protected methods16611.14%
▷ Private methods16110.81%
Functions176
▷ Named functions7944.89%
▷ Anonymous functions9755.11%
Constants329
▷ Global constants8124.62%
▷ Class constants24875.38%
▷ Public constants248100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/wpo-helper.png17.86KB5.25KB▼ 70.62%