67% kudos-donations

Code Review | Kudos Donations - Easy donations and payments with Mollie

WordPress plugin Kudos Donations - Easy donations and payments with Mollie scored 67% from 54 tests.

About plugin

  • Plugin page: kudos-donations
  • Plugin version: 3.1.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: May 15, 2020
  • Latest release: Jun 12, 2023
  • Number of updates: 243
  • Update frequency: every 4.6 days
  • Top authors: iseardmedia (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 4,125 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲3.63MB] [CPU: ▲17.83ms] Passed 4 tests

A check of server-side resources used by Kudos Donations - Easy donations and payments with Mollie
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.11 ▲3.6563.00 ▲19.20
Dashboard /wp-admin6.94 ▲3.6369.33 ▲11.70
Posts /wp-admin/edit.php6.98 ▲3.6370.33 ▲22.11
Add New Post /wp-admin/post-new.php9.67 ▲3.78118.59 ▲18.30
Media Library /wp-admin/upload.php6.86 ▲3.6365.77 ▲32.15
Transactions /wp-admin/admin.php?page=kudos-transactions6.9764.24
Tools /wp-admin/admin.php?page=kudos-tools6.8965.77
Scheduled Actions /wp-admin/tools.php?page=action-scheduler7.0264.90
Campaigns /wp-admin/admin.php?page=kudos-campaigns6.9857.56
Settings /wp-admin/admin.php?page=kudos-settings6.8758.52
Donors /wp-admin/admin.php?page=kudos-donors6.9358.04
Subscriptions /wp-admin/admin.php?page=kudos-subscriptions6.9660.93

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 953 new files
Database: 8 new tables, 30 new options
New tables
wp_kudos_subscriptions
wp_actionscheduler_actions
wp_actionscheduler_logs
wp_actionscheduler_groups
wp_actionscheduler_claims
wp_kudos_log
wp_kudos_donors
wp_kudos_transactions
New WordPress options
_kudos_return_message_enable
widget_theysaidso_widget
_kudos_return_message_title
_kudos_custom_return_enable
schema-ActionScheduler_StoreSchema
_kudos_smtp_enable
_kudos_disable_object_cache
_kudos_theme_colors
_kudos_show_intro
widget_recent-comments
...

Browser metrics Passed 4 tests

Kudos Donations - Easy donations and payments with Mollie: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,001 ▲26615.03 ▲0.4219.99 ▲18.2142.99 ▼2.20
Dashboard /wp-admin2,268 ▲794.92 ▼0.03114.46 ▼6.2741.68 ▼4.05
Posts /wp-admin/edit.php2,151 ▲622.05 ▲0.0334.31 ▼5.1831.58 ▼2.28
Add New Post /wp-admin/post-new.php1,552 ▲1623.38 ▲0.05681.85 ▲63.2138.72 ▼7.98
Media Library /wp-admin/upload.php1,450 ▲684.14 ▼0.21101.11 ▲3.3442.72 ▲2.60
Transactions /wp-admin/admin.php?page=kudos-transactions1,1521.9332.0827.76
Tools /wp-admin/admin.php?page=kudos-tools9072.0626.5427.26
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2961.8526.3029.22
Campaigns /wp-admin/admin.php?page=kudos-campaigns1,0901.8428.2925.64
Settings /wp-admin/admin.php?page=kudos-settings9576.86165.8734.68
Donors /wp-admin/admin.php?page=kudos-donors1,0271.7227.9726.74
Subscriptions /wp-admin/admin.php?page=kudos-subscriptions1,0961.8628.7928.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall successfully, leaving 8 tables in the database
    • wp_kudos_donors
    • wp_actionscheduler_claims
    • wp_kudos_transactions
    • wp_actionscheduler_groups
    • wp_actionscheduler_actions
    • wp_kudos_log
    • wp_actionscheduler_logs
    • wp_kudos_subscriptions
  • Zombie WordPress options were found after uninstall: 31 options
    • _kudos_return_message_enable
    • _kudos_disable_object_cache
    • _kudos_donate_modal_in_footer
    • schema-ActionScheduler_StoreSchema
    • action_scheduler_migration_status
    • _kudos_debug_mode
    • widget_recent-posts
    • _kudos_donations_version
    • _kudos_return_message_text
    • action_scheduler_lock_async-request-runner
    • ...

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 50× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/orders/cancel-order-lines.php
    • > /wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/settlements/list-settlements.php
    • > /wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/customers/list-customer-payments.php
    • > /wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/payments/create-payment.php
    • > /wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/customers/create-customer-first-payment.php
    • > /wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/orders/update-order.php
    • > /wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/customers/create-customer.php
    • > /wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/customers/update-customer.php
    • > /wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/mandates/list-mandates.php
    • > /wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/shipments/update-shipment.php
  • 611× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Error\\Error' not found in wp-content/plugins/kudos-donations/vendor/twig/twig/src/Error/SyntaxError.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_Schema' not found in wp-content/plugins/kudos-donations/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Endpoints\\CollectionEndpointAbstract' not found in wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/src/Endpoints/BalanceEndpoint.php:10
    • > PHP Warning
      require_once(wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/examples/initialize.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Mollie\\Api\\Exceptions\\ApiException' not found in wp-content/plugins/kudos-donations/vendor/mollie/mollie-api-php/src/Exceptions/IncompatiblePlatform.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/kudos-donations/vendor/twig/twig/src/Node/Expression/ParentExpression.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/kudos-donations/vendor/monolog/monolog/src/Monolog/Logger.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/kudos-donations/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Error\\Error' not found in wp-content/plugins/kudos-donations/vendor/twig/twig/src/Sandbox/SecurityError.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'DI\\Definition\\Resolver\\DefinitionResolver' not found in wp-content/plugins/kudos-donations/vendor/php-di/php-di/src/Definition/Resolver/EnvironmentVariableResolver.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% 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
5 plugin tags: donation, ideal, mollie, payment, credit card

kudos-donations/kudos-donations.php 77% from 13 tests

The principal PHP file in "Kudos Donations - Easy donations and payments with Mollie" v. 3.1.6 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.2.9" instead of "7.2")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.6" instead of "5.5")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected57,763 lines of code in 899 files:
LanguageFilesBlank linesComment linesLines of code
PHP82512,37529,82652,121
Markdown2883702,089
JSON19002,037
Twig13136251,176
YAML34733197
SVG200110
XML14215
reStructuredText18510
JavaScript5016
CSS2002

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 210)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.86
▷ Minimum class complexity1.00
▷ Maximum class complexity303.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity210.00
Code structure
Namespaces95
Interfaces63
Traits6
Classes663
▷ Abstract classes477.09%
▷ Concrete classes61692.91%
▷ Final classes6911.20%
Methods3,742
▷ Static methods3138.36%
▷ Public methods2,87076.70%
▷ Protected methods55914.94%
▷ Private methods3138.36%
Functions264
▷ Named functions15357.95%
▷ Anonymous functions11142.05%
Constants336
▷ Global constants144.17%
▷ Class constants32295.83%
▷ Public constants28889.44%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.25MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/images/guide-mollie-api.png104.34KB28.78KB▼ 72.42%
dist/images/guide-welcome.png30.09KB12.10KB▼ 59.78%
dist/images/logo-colour-40.png2.22KB0.70KB▼ 68.61%
dist/images/guide-button.png24.82KB10.56KB▼ 57.46%
dist/images/guide-test-live.png20.96KB10.65KB▼ 49.18%