68% mollie-forms

Code Review | Mollie Forms

WordPress plugin Mollie Forms scored68%from 54 tests.

About plugin

  • Plugin page: mollie-forms
  • Plugin version: 2.6.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 3, 2017
  • Latest release: Nov 22, 2023
  • Number of updates: 167
  • Update frequency: every 15.0 days
  • Top authors: ndijkstra (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

3,000+ active /80,495 total downloads

Benchmarks

Plugin footprint 65% 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.95MB] [CPU: ▲4.17ms] Passed 4 tests

A check of server-side resources used by Mollie Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6749.12 ▲8.45
Dashboard /wp-admin4.38 ▲1.0853.84 ▲4.03
Posts /wp-admin/edit.php4.40 ▲1.0455.06 ▲8.93
Add New Post /wp-admin/post-new.php7.03 ▲1.1494.27 ▼4.72
Media Library /wp-admin/upload.php4.26 ▲1.0344.49 ▲12.34
Add-ons /wp-admin/edit.php?post_type=mollie-forms&page=add-ons4.1842.15
All Forms /wp-admin/edit.php?post_type=mollie-forms4.3045.83
Registrations /wp-admin/edit.php?post_type=mollie-forms&page=registrations4.1941.98
Registration /wp-admin/admin.php?page=registration4.1837.36
Add New /wp-admin/post-new.php?post_type=mollie-forms4.6259.48

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 21 new files
Database: 8 new tables, 7 new options
New tables
wp_mollie_forms_customers
wp_mollie_forms_subscriptions
wp_mollie_forms_registrations
wp_mollie_forms_registration_price_options
wp_mollie_forms_price_options
wp_mollie_forms_discount_codes
wp_mollie_forms_registration_fields
wp_mollie_forms_payments
New WordPress options
mollie-forms_version
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Mollie Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8014.27 ▼0.442.13 ▲0.3644.72 ▲0.84
Dashboard /wp-admin2,238 ▲615.74 ▲0.0988.41 ▼0.5639.38 ▼1.40
Posts /wp-admin/edit.php2,156 ▲562.22 ▲0.2238.76 ▼3.7332.58 ▼3.40
Add New Post /wp-admin/post-new.php1,565 ▲3922.90 ▼0.26601.70 ▲4.2634.59 ▼25.82
Media Library /wp-admin/upload.php1,452 ▲524.22 ▲0.0298.55 ▲2.8843.36 ▼0.02
Add-ons /wp-admin/edit.php?post_type=mollie-forms&page=add-ons8351.7926.2028.61
All Forms /wp-admin/edit.php?post_type=mollie-forms1,1172.3033.8329.44
Registrations /wp-admin/edit.php?post_type=mollie-forms&page=registrations9651.8129.2325.32
Registration /wp-admin/admin.php?page=registration8111.8025.4222.89
Add New /wp-admin/post-new.php?post_type=mollie-forms5,59411.85387.58101.70

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie tables detected upon uninstall: 8 tables
    • wp_mollie_forms_registrations
    • wp_mollie_forms_registration_fields
    • wp_mollie_forms_discount_codes
    • wp_mollie_forms_registration_price_options
    • wp_mollie_forms_customers
    • wp_mollie_forms_subscriptions
    • wp_mollie_forms_payments
    • wp_mollie_forms_price_options
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • mollie-forms_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mollie-forms/mollie-forms.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: method in wp-content/plugins/mollie-forms/templates/metaboxes/paymentMethod.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/mollie-forms/templates/metaboxes/paymentMethod.php:15
    • > PHP Notice
      Undefined variable: method in wp-content/plugins/mollie-forms/templates/metaboxes/paymentMethod.php on line 12
    • > PHP Notice
      Undefined variable: method in wp-content/plugins/mollie-forms/templates/metaboxes/paymentMethod.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mollie-forms/templates/metaboxes/discountCodes.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/mollie-forms/classes/RegistrationsTable.php:5
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/mollie-forms/templates/metaboxes/paymentMethod.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mollie-forms/templates/admin/registration.php:2
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/mollie-forms/templates/metaboxes/paymentMethod.php on line 12
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/mollie-forms/templates/metaboxes/paymentMethod.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt might help

mollie-forms/mollie-forms.php Passed 13 tests

Analyzing the main PHP file in "Mollie Forms" version 2.6.2
103 characters long description:
Create registration forms with payment methods of Mollie. One-time and recurring payments are possible.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin4,841 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP186055454,694
CSS16082
JavaScript113065

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity48.60
▷ Minimum class complexity1.00
▷ Maximum class complexity135.00
Average method complexity6.34
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods90
▷ Static methods00.00%
▷ Public methods7178.89%
▷ Protected methods00.00%
▷ Private methods1921.11%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.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
No PNG files were detected