52% seamless-donations

Code Review | Seamless Donations: A Platform for Global Fundraising and Rebuilding using Stripe and PayPal

WordPress plugin Seamless Donations: A Platform for Global Fundraising and Rebuilding using Stripe and PayPal scored52%from 54 tests.

About plugin

  • Plugin page: seamless-donations
  • Plugin version: 5.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 12, 2012
  • Latest release: Nov 18, 2023
  • Number of updates: 196
  • Update frequency: every 20.9 days
  • Top authors: dgewirtz (62.24%)allendav (28.57%)designgeneers (10.2%)

Code review

54 tests

User reviews

70 reviews

Install metrics

6,000+ active /457,606 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲4.48MB] [CPU: ▲25.98ms] 75% from 4 tests

An overview of server-side resources used by Seamless Donations: A Platform for Global Fundraising and Rebuilding using Stripe and PayPal
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 790.82ms on /wp-admin/admin.php?page=seamless_donations_tab_settings)
PageMemory (MB)CPU Time (ms)
Home /7.56 ▲4.1061.65 ▲22.27
Dashboard /wp-admin7.95 ▲4.6073.73 ▲12.79
Posts /wp-admin/edit.php7.98 ▲4.6279.63 ▲34.14
Add New Post /wp-admin/post-new.php10.49 ▲4.60121.37 ▲38.07
Media Library /wp-admin/upload.php7.83 ▲4.6064.92 ▲34.73
Add New /wp-admin/post-new.php?post_type=funds7.8868.27
Licenses /wp-admin/admin.php?page=seamless_donations_tab_licenses8.1360.11
Thank You Page /wp-admin/admin.php?page=seamless_donations_tab_thanks8.1563.50
Settings /wp-admin/admin.php?page=seamless_donations_tab_settings8.42790.82
Form Options /wp-admin/admin.php?page=seamless_donations_tab_forms8.4677.48
Logs /wp-admin/admin.php?page=seamless_donations_tab_logs8.1777.49
Seamless Donations /wp-admin/admin.php?page=seamless_donations_tab_main8.0672.21
Funds /wp-admin/edit.php?post_type=funds7.8879.87
Thank You Templates /wp-admin/admin.php?page=seamless_donations_tab_templates8.2865.24
Add-ons /wp-admin/admin.php?page=seamless_donations_tab_addons8.0666.40

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 646 new files
Database: 1 new table, 64 new options
New tables
wp_seamless_donations_audit
New WordPress options
dgx_donate_paypal_server
dgx_donate_notify_emails
dgx_donate_stripe_server
dgx_donate_cron_log
dgx_donate_form_style
dgx_donate_email_reply
dgx_donate_seamless_donations_tab_forms_button_list
dgx_donate_4013_anon_updated
dgx_donate_email_list
dgx_donate_seamless_donations_tab_logs_button_list
...

Browser metrics Passed 4 tests

Checking browser requirements for Seamless Donations: A Platform for Global Fundraising and Rebuilding using Stripe and PayPal
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,138 ▲37617.69 ▲3.4328.00 ▲26.2870.50 ▲31.56
Dashboard /wp-admin2,347 ▲1695.75 ▲0.06101.47 ▼13.4343.09 ▼2.86
Posts /wp-admin/edit.php2,252 ▲1522.30 ▲0.3342.58 ▲2.8534.69 ▼0.25
Add New Post /wp-admin/post-new.php1,651 ▲10622.11 ▼2.91699.05 ▲81.8639.64 ▼29.19
Media Library /wp-admin/upload.php1,549 ▲1554.42 ▲0.2299.54 ▼0.9743.63 ▼0.51
Add New /wp-admin/post-new.php?post_type=funds1,6002.8360.5735.68
Licenses /wp-admin/admin.php?page=seamless_donations_tab_licenses9991.9334.5528.88
Thank You Page /wp-admin/admin.php?page=seamless_donations_tab_thanks1,0302.0634.2429.91
Settings /wp-admin/admin.php?page=seamless_donations_tab_settings1,6112.0731.6135.25
Form Options /wp-admin/admin.php?page=seamless_donations_tab_forms3,5032.5243.7079.36
Logs /wp-admin/admin.php?page=seamless_donations_tab_logs1,3054.5085.8040.69
Seamless Donations /wp-admin/admin.php?page=seamless_donations_tab_main1,5599.22299.0470.62
Funds /wp-admin/edit.php?post_type=funds1,2242.2740.0932.42
Thank You Templates /wp-admin/admin.php?page=seamless_donations_tab_templates1,2922.1336.3637.35
Add-ons /wp-admin/admin.php?page=seamless_donations_tab_addons1,2472.1430.7939.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_seamless_donations_audit
  • The uninstall procedure has failed, leaving 64 options in the database
    • dgx_donate_payment_processor_choice
    • dgx_donate_4013_anon_updated
    • dgx_donate_seamless_donations_tab_forms_button_list
    • dgx_donate_seamless_donations_tab_templates_button_list
    • dgx_donate_email_anon
    • dgx_donate_default_country
    • dgx_donate_email_name
    • dgx_donate_currency
    • dgx_donate_log
    • dgx_donate_4012_indexes_updated
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/seamless-donations/library/stripe-php/build.php
    • > /wp-content/plugins/seamless-donations/library/stripe-php/update_certs.php
  • 153× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/seamless-donations/library/stripe-php/lib/Issuing/CardDetails.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\OAuth\\OAuthErrorException' not found in wp-content/plugins/seamless-donations/library/stripe-php/lib/Exception/OAuth/InvalidGrantException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Multicheck' not found in wp-content/plugins/seamless-donations/library/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php:13
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/seamless-donations/library/stripe-php/build.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/seamless-donations/library/stripe-php/lib/Transfer.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/seamless-donations/library/stripe-php/lib/Terminal/Location.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/seamless-donations/library/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/seamless-donations/library/stripe-php/lib/Charge.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\StripeObject' not found in wp-content/plugins/seamless-donations/library/stripe-php/lib/OrderItem.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/seamless-donations/library/stripe-php/lib/InvoiceItem.php:37

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=seamless_donations_tab_main
    • > Javascript (severe) in unknown
    http://s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js 194:13 Uncaught TypeError: Cannot read properties of undefined (reading 'replace')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 24 tag instead of maximum 10
  • Screenshots: Screenshot #1 (The default, mobile-responsive donation form) image not found
Please take inspiration from this readme.txt

seamless-donations/seamless-donations.php Passed 13 tests

The entry point to "Seamless Donations: A Platform for Global Fundraising and Rebuilding using Stripe and PayPal" version 5.2.6 is a PHP file that has certain tags in its header comment area
49 characters long description:
A platform for global fundraising and rebuilding.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/seamless-donations/library/stripe-php/data/ca-certificates.crt
76,703 lines of code in 421 files:
LanguageFilesBlank linesComment linesLines of code
PO File12616,78021,61638,053
PHP2305,28512,89025,736
CSS256281,4268,123
JavaScript185748002,376
Markdown1096401,888
HTML383264
JSON400152
XML10031
Bourne Shell15227
make19027
C17423
YAML1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.91
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces12
Interfaces5
Traits7
Classes191
▷ Abstract classes178.90%
▷ Concrete classes17491.10%
▷ Final classes00.00%
Methods898
▷ Static methods24327.06%
▷ Public methods76284.86%
▷ Protected methods10411.58%
▷ Private methods323.56%
Functions389
▷ Named functions37897.17%
▷ Anonymous functions112.83%
Constants639
▷ Global constants60.94%
▷ Class constants63399.06%
▷ Public constants633100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
20 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
library/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
css/jquery-ui-1.12.1/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%
css/jquery-ui-1.12.1/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
library/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
library/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%