62% doneren-met-mollie

Code Review | Doneren met Mollie

WordPress plugin Doneren met Mollie scored62%from 54 tests.

About plugin

  • Plugin page: doneren-met-mollie
  • Plugin version: 2.10.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 15, 2016
  • Latest release: Nov 22, 2023
  • Number of updates: 171
  • Update frequency: every 16.6 days
  • Top authors: ndijkstra (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

5,000+ active /80,440 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.56MB] [CPU: ▲2.88ms] Passed 4 tests

Server-side resources used by Doneren met Mollie
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2850.37 ▲4.44
Dashboard /wp-admin3.99 ▲0.6851.89 ▲0.99
Posts /wp-admin/edit.php4.01 ▲0.6554.22 ▲5.44
Add New Post /wp-admin/post-new.php6.62 ▲0.7285.23 ▲0.65
Media Library /wp-admin/upload.php3.87 ▲0.6342.05 ▲8.37
Donations /wp-admin/admin.php?page=doneren-met-mollie3.7839.75
Donation /wp-admin/admin.php?page=doneren-met-mollie-donatie3.7638.92
Settings /wp-admin/admin.php?page=doneren-met-mollie-instellingen3.8143.88

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: 3 new tables, 8 new options
New tables
wp_donate_mollie_donors
wp_donate_mollie
wp_donate_mollie_subscriptions
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
dmm_v251_updated
widget_recent-comments
dmm_version
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Doneren met Mollie
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7014.24 ▼0.021.73 ▲0.0844.02 ▲0.48
Dashboard /wp-admin2,222 ▲455.62 ▲0.0492.55 ▼5.3740.89 ▼10.25
Posts /wp-admin/edit.php2,130 ▲271.95 ▼0.0035.98 ▼0.6530.82 ▼0.75
Add New Post /wp-admin/post-new.php1,550 ▲2023.38 ▲0.29654.94 ▲37.9868.08 ▲15.20
Media Library /wp-admin/upload.php1,424 ▲274.21 ▲0.0596.95 ▲0.7743.73 ▲1.81
Donations /wp-admin/admin.php?page=doneren-met-mollie7832.0125.9323.23
Donation /wp-admin/admin.php?page=doneren-met-mollie-donatie9841.9923.0526.66
Settings /wp-admin/admin.php?page=doneren-met-mollie-instellingen1,3301.9625.2331.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_donate_mollie_subscriptions
    • wp_donate_mollie_donors
    • wp_donate_mollie
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • dmm_version
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • dmm_v251_updated
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+340
    Undefined index: id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+428
    Trying to get property 'customer_id' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+363
    Trying to get property 'dm_name' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+368
    Trying to get property 'dm_email' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+373
    Trying to get property 'dm_company' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+378
    Trying to get property 'dm_phone' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+383
    Trying to get property 'dm_address' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+383
    Trying to get property 'dm_zipcode' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+383
    Trying to get property 'dm_city' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+383
    Trying to get property 'dm_country' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+388
    Trying to get property 'dm_project' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+393
    Trying to get property 'dm_message' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+398
    Trying to get property 'dm_currency' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+398
    Trying to get property 'dm_amount' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Warning in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+398
    number_format() expects parameter 2 to be int, array given
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+403
    Trying to get property 'dm_settlement_currency' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+403
    Trying to get property 'dm_settlement_amount' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+408
    Trying to get property 'payment_method' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+413
    Trying to get property 'dm_status' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+418
    Trying to get property 'donation_id' of non-object
    • > GET request to /wp-admin/admin.php?page=doneren-met-mollie-donatie
    • > Notice in wp-content/plugins/doneren-met-mollie/includes/class-admin.php+423
    Trying to get property 'payment_id' of non-object

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 fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/doneren-met-mollie/doneren-met-mollie.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/doneren-met-mollie/includes/class-donors-table.php:3
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/doneren-met-mollie/includes/config.php on line 9
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/doneren-met-mollie/includes/config.php on line 8
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/doneren-met-mollie/includes/config.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/doneren-met-mollie/includes/class-subscriptions-table.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/doneren-met-mollie/includes/class-donations-table.php:3
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/doneren-met-mollie/includes/config.php on line 10
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/doneren-met-mollie/includes/config.php on line 8
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/doneren-met-mollie/includes/config.php on line 9

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 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 24 tag instead of maximum 10
  • Plugin Name: You should set the name of your plugin on the first line ( === doneren-met-mollie === )
You can take inspiration from this readme.txt

doneren-met-mollie/doneren-met-mollie.php Passed 13 tests

"Doneren met Mollie" version 2.10.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
28 characters long description:
Receive donations via Mollie

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected2,563 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP103652532,563

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 162)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity55.14
▷ Minimum class complexity5.00
▷ Maximum class complexity190.00
Average method complexity6.34
▷ Minimum method complexity1.00
▷ Maximum method complexity162.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods71
▷ Static methods00.00%
▷ Public methods5780.28%
▷ Protected methods11.41%
▷ Private methods1318.31%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants1493.33%
▷ Class constants16.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin