72% cf7-mollie

Code Review | Mollie for Contact Form 7

WordPress plugin Mollie for Contact Form 7 scored 72% from 54 tests.

About plugin

  • Plugin page: cf7-mollie
  • Plugin version: 5.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.6.1
  • WordPress version: 6.3.1
  • First release: Jan 15, 2019
  • Latest release: Dec 27, 2022
  • Number of updates: 134
  • Update frequency: every 10.8 days
  • Top authors: tsjippy (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active / 4,519 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Mollie for Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1739.45 ▼7.55
Dashboard /wp-admin3.36 ▲0.0531.90 ▼15.81
Posts /wp-admin/edit.php3.42 ▲0.0735.00 ▼10.66
Add New Post /wp-admin/post-new.php5.60 ▼0.2970.63 ▼26.13
Media Library /wp-admin/upload.php3.36 ▲0.1330.56 ▼2.87
Mollie /wp-admin/admin.php?page=wpcf7-mollie-config3.3327.90

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 377 new files
Database: 1 new table, 7 new options
New tables
wp_cf7_mollie
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
cf7_mollie_db_version
widget_recent-comments

Browser metrics Passed 4 tests

Mollie for Contact Form 7: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲6914.78 ▲0.491.88 ▼0.4743.80 ▼0.84
Dashboard /wp-admin2,208 ▲205.88 ▲0.00103.87 ▼3.7839.42 ▲0.06
Posts /wp-admin/edit.php2,100 ▲142.06 ▲0.0042.08 ▲4.1135.44 ▼0.40
Add New Post /wp-admin/post-new.php1,546 ▲13518.67 ▲0.82614.70 ▼21.7252.31 ▲0.41
Media Library /wp-admin/upload.php1,396 ▲54.23 ▼0.0192.86 ▼11.3942.29 ▼5.20
Mollie /wp-admin/admin.php?page=wpcf7-mollie-config1,2862.1524.1932.39

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wpcf7-mollie-config
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/contact-form-7/wp-contact-form-7.php): failed to open stream: No such file or directory

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 take a closer look at the following
  • 50× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/payments/list-payments.php
    • > /wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/customers/update-customer.php
    • > /wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/profiles/update-profile.php
    • > /wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/orders/update-order-line.php
    • > /wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/subscriptions/cancel-subscription.php
    • > /wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/orders/list-methods.php
    • > /wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/initialize.php
    • > /wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/orders/refund-order-partially.php
    • > /wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/settlements/list-settlements.php
    • > /wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/payments/list-methods.php
  • 245× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Endpoints\\CollectionEndpointAbstract' not found in wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/src/Endpoints/OrganizationEndpoint.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\CursorCollection' not found in wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/src/Resources/CaptureCollection.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\BaseResource' not found in wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/src/Resources/Subscription.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\BaseResource' not found in wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/src/Resources/Partner.php:5
    • > PHP Warning
      require_once(wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/initialize.php on line 9
    • > PHP Warning
      require_once(wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/payments/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/payments/create-routed-payment.php on line 11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/cf7-mollie/includes/libs/vendor/guzzlehttp/psr7/src/MultipartStream.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\CursorCollection' not found in wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/src/Resources/ClientCollection.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/examples/initialize.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Resources\\BaseResource' not found in wp-content/plugins/cf7-mollie/includes/libs/vendor/mollie/mollie-api-php/src/Resources/Capture.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
7 plugin tags: paypal, contact form 7 mollie, payment form, donate, donatie...

cf7-mollie/cf7-mollie.php 92% from 13 tests

"Mollie for Contact Form 7" version 5.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected39,536 lines of code in 351 files:
LanguageFilesBlank linesComment linesLines of code
PHP3164,28012,31434,553
Markdown161,28303,820
JSON1200640
PO File1119116307
JavaScript11212100
CSS217482
XML10015
Dockerfile18010
make1409

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.71
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces21
Interfaces17
Traits2
Classes200
▷ Abstract classes52.50%
▷ Concrete classes19597.50%
▷ Final classes2512.82%
Methods1,210
▷ Static methods17614.55%
▷ Public methods95478.84%
▷ Protected methods1018.35%
▷ Private methods15512.81%
Functions217
▷ Named functions12055.30%
▷ Anonymous functions9744.70%
Constants337
▷ Global constants7722.85%
▷ Class constants26077.15%
▷ Public constants260100.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
There were not PNG files found in your plugin