84% pronamic-pay-with-mollie-for-contact-form-7

Code Review | Pronamic Pay with Mollie for Contact Form 7

WordPress plugin Pronamic Pay with Mollie for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: pronamic-pay-with...
  • Plugin version: 1.4.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Feb 1, 2023
  • Latest release: Nov 9, 2023
  • Number of updates: 37
  • Update frequency: every 7.6 days
  • Top authors: pronamic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,308 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.15ms] Passed 4 tests

An overview of server-side resources used by Pronamic Pay with Mollie for Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.37 ▼0.16
Dashboard /wp-admin3.31 ▲0.0042.50 ▼2.93
Posts /wp-admin/edit.php3.36 ▲0.0045.65 ▼1.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.89 ▼4.29
Media Library /wp-admin/upload.php3.23 ▲0.0037.13 ▲7.12

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 929 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pronamic Pay with Mollie for Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.67 ▲0.401.90 ▲0.1944.01 ▲7.29
Dashboard /wp-admin2,198 ▲245.58 ▼0.0782.70 ▼13.5739.31 ▼7.34
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0139.12 ▲4.4737.12 ▼1.20
Add New Post /wp-admin/post-new.php1,526 ▼923.14 ▼2.05664.77 ▲65.8651.18 ▼17.58
Media Library /wp-admin/upload.php1,403 ▼04.21 ▲0.04101.97 ▼0.6843.93 ▼2.09

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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)
Even though everything seems fine, this is not 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
  • 219× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/pronamic-pay-with-mollie-for-contact-form-7/packages/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Exception\\RuntimeException' not found in wp-content/plugins/pronamic-pay-with-mollie-for-contact-form-7/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/JsonDecodingException.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_SimpleSchedule' not found in wp-content/plugins/pronamic-pay-with-mollie-for-contact-form-7/packages/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-pay-with-mollie-for-contact-form-7/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-pay-with-mollie-for-contact-form-7/vendor/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/pronamic-pay-with-mollie-for-contact-form-7/vendor/automattic/jetpack-autoloader/src/jetpack-autoloader/class-autoloader.php' (include_path='.:/usr/share/php') in wp-content/plugins/pronamic-pay-with-mollie-for-contact-form-7/vendor/automattic/jetpack-autoloader/src/autoload.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_Schema' not found in wp-content/plugins/pronamic-pay-with-mollie-for-contact-form-7/packages/woocommerce/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Constraints\\Constraint' not found in wp-content/plugins/pronamic-pay-with-mollie-for-contact-form-7/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Exception\\RuntimeException' not found in wp-content/plugins/pronamic-pay-with-mollie-for-contact-form-7/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidConfigException.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-pay-with-mollie-for-contact-form-7/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: payment, contact, contact form, mollie, form...

pronamic-pay-with-mollie-for-contact-form-7/pronamic-pay-with-mollie-for-contact-form-7.php Passed 13 tests

The entry point to "Pronamic Pay with Mollie for Contact Form 7" version 1.4.0 is a PHP file that has certain tags in its header comment area
63 characters long description:
Pronamic Pay plugin with Mollie for Contact Form 7 integration.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin70,442 lines of code in 699 files:
LanguageFilesBlank linesComment linesLines of code
PHP53011,63327,45043,290
PO File55,46112,0608,455
JavaScript242,3272,2317,897
JSON403104,397
Markdown271,23703,023
XML4001,991
CSS131229982
HTML1550150
YAML4340129
SVG4800116
reStructuredText312412

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity9.69
▷ Minimum class complexity1.00
▷ Maximum class complexity211.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces48
Interfaces12
Traits9
Classes434
▷ Abstract classes286.45%
▷ Concrete classes40693.55%
▷ Final classes00.00%
Methods2,508
▷ Static methods27811.08%
▷ Public methods2,07682.78%
▷ Protected methods2359.37%
▷ Private methods1977.85%
Functions134
▷ Named functions3929.10%
▷ Anonymous functions9570.90%
Constants220
▷ Global constants10.45%
▷ Class constants21999.55%
▷ Public constants219100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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/diners-club/card-diners-club-logo-_x80.png4.50KB4.36KB▼ 3.10%
packages/wp-pay/core/images/dist/cards/american-express/card-american-express-background-480x270@3x.png0.29KB0.23KB▼ 19.66%
packages/wp-pay/core/images/dist/cards/bunq/card-bunq-logo-_x80@4x.png7.03KB6.98KB▼ 0.78%
packages/wp-pay/core/images/dist/cards/american-express/card-american-express-logo-_x80@2x.png7.59KB7.53KB▼ 0.71%
packages/wp-pay/core/images/dist/cards/ing/card-ing-background-480x270@4x.png58.46KB56.74KB▼ 2.95%