84% pronamic-pay-with-mollie-for-gravity-forms

Code Review | Pronamic Pay with Mollie for Gravity Forms

WordPress plugin Pronamic Pay with Mollie for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: pronamic-pay-with...
  • Plugin version: 1.2.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2
  • WordPress version: 6.3.1
  • First release: Mar 10, 2023
  • Latest release: Nov 9, 2023
  • Number of updates: 20
  • Update frequency: every 12.2 days
  • Top authors: pronamic (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /939 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Pronamic Pay with Mollie for Gravity Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.11 ▼7.69
Dashboard /wp-admin3.31 ▼0.0444.50 ▼17.30
Posts /wp-admin/edit.php3.36 ▲0.0047.05 ▲2.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.07 ▼11.82
Media Library /wp-admin/upload.php3.23 ▲0.0032.84 ▼2.20

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 959 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Pronamic Pay with Mollie for Gravity Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.60 ▲0.231.49 ▼0.3839.05 ▼8.74
Dashboard /wp-admin2,195 ▲185.61 ▲0.0385.48 ▼17.3938.16 ▼4.51
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.0633.68 ▼7.3731.98 ▼3.87
Add New Post /wp-admin/post-new.php1,526 ▼1022.97 ▼0.04650.03 ▼35.6550.76 ▼5.41
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0196.86 ▼17.3340.98 ▼3.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 224× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/vendor/composer/installers/src/Composer/Installers/GravInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'JsonSchema\\Uri\\Retrievers\\UriRetrieverInterface' not found in wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/AbstractRetriever.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/wp-pay-extensions/gravityforms/pronamic-pay-gravityforms.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Exception\\RuntimeException' not found in wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/ValidationException.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Action' not found in wp-content/plugins/pronamic-pay-with-mollie-for-gravity-forms/packages/woocommerce/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: form, mollie, gravity, donation, payment

pronamic-pay-with-mollie-for-gravity-forms/pronamic-pay-with-mollie-for-gravity-forms.php Passed 13 tests

The main file in "Pronamic Pay with Mollie for Gravity Forms" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
Pronamic Pay plugin with Mollie for Gravity Forms integration.

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
Good job! No executable or dangerous file extensions detected77,191 lines of code in 726 files:
LanguageFilesBlank linesComment linesLines of code
PHP54612,89729,44547,403
PO File65,39011,03010,256
JavaScript252,3662,2608,039
JSON433104,560
Markdown301,38103,495
XML4001,991
CSS15131251,039
HTML1550150
YAML4340129
SVG4900117
reStructuredText312412

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.35
Average class complexity10.44
▷ Minimum class complexity1.00
▷ Maximum class complexity211.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces48
Interfaces12
Traits9
Classes448
▷ Abstract classes286.25%
▷ Concrete classes42093.75%
▷ Final classes00.00%
Methods2,626
▷ Static methods30211.50%
▷ Public methods2,18583.21%
▷ Protected methods2358.95%
▷ Private methods2067.84%
Functions151
▷ Named functions4026.49%
▷ Anonymous functions11173.51%
Constants259
▷ Global constants10.39%
▷ Class constants25899.61%
▷ Public constants258100.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
178 compressed PNG files occupy 4.27MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
packages/wp-pay/core/images/dist/cards/discover/card-discover-logo-_x80.png3.47KB3.40KB▼ 1.83%
packages/wp-pay/core/images/dist/cards/asn-bank/card-asn-bank-background-480x270@4x.png0.40KB0.34KB▼ 14.32%
packages/wp-pay/core/images/dist/cards/regiobank/card-regiobank-background-480x270@2x.png14.06KB14.00KB0.40%
packages/wp-pay/core/images/dist/cards/knab/card-knab-background-480x270@3x.png10.79KB10.73KB▼ 0.57%
packages/wp-pay/core/images/dist/cards/american-express/card-american-express-background-480x270@4x.png0.40KB0.34KB▼ 14.32%