10% give

Code Review | GiveWP - Donation Plugin and Fundraising Platform

WordPress plugin GiveWP - Donation Plugin and Fundraising Platform scored 10% from 54 tests.

About plugin

  • Plugin page: give
  • Plugin version: 2.19.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.9.2
  • First release: Apr 7, 2015
  • Latest release: Apr 5, 2022
  • Number of updates: 294
  • Update frequency: every 8.9 days
  • Top authors: dlocc (72.79%)jason_the_adams (16.33%)webdevmattcrom (10.88%)Otto42 (1.02%)

Code review

54 tests

User reviews

516 reviews

Install metrics

100,000+ active / 3,678,673 total downloads

Benchmarks

Plugin footprint 21% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/give/includes/admin/upgrades/upgrade-functions.php+3561
    unlink(wp-content/uploads/give-payments.csv): No such file or directory

Server metrics [RAM: ▲12.20MB] [CPU: ▼176.04ms] 50% from 4 tests

This is a short check of server-side resources used by GiveWP - Donation Plugin and Fundraising Platform
The following require your attention
  • RAM: You should keep total memory usage under 10MB (currently 18.81MB on /wp-admin/widgets.php)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 12.20MB on /wp-admin/widgets.php)
PageMemory (MB)CPU Time (ms)
Home /13.79 ▲10.28171.97 ▲89.36
Dashboard /wp-admin16.28 ▲12.88264.61 ▲214.55
Posts /wp-admin/edit.php16.49 ▲12.84149.15 ▲90.37
Add New Post /wp-admin/post-new.php20.71 ▲13.74255.21 ▼1,098.42
Media Library /wp-admin/upload.php16.12 ▲12.82319.62 ▲286.64
Settings /wp-admin/edit.php?post_type=give_forms&page=give-settings16.67141.85
Menus /wp-admin/nav-menus.php16.03120.84
Reports /wp-admin/edit.php?post_type=give_forms&page=give-reports16.22127.71
/wp-admin/admin.php?page=give-form-preview16.31235.80
/wp-admin/admin.php?page=give-onboarding-wizard16.34129.31
Add-ons /wp-admin/edit.php?post_type=give_forms&page=give-add-ons16.28285.46
All Forms /wp-admin/edit.php?post_type=give_forms&page=give-forms16.17127.43
Tools /wp-admin/edit.php?post_type=give_forms&page=give-tools16.42127.16
Add Form /wp-admin/post-new.php?post_type=give_forms16.92172.02
Widgets /wp-admin/widgets.php18.81175.74

Server storage [IO: ▲45.19MB] [DB: ▲0.06MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • Total filesystem usage must be limited to 25MB (currently using 45.19MB)
Filesystem: 2,682 new files
Database: 13 new tables, 3 new options
New tables
wp_give_sequential_ordering
wp_give_donors
wp_give_donormeta
wp_give_sessions
wp_give_comments
wp_give_subscriptions
wp_give_revenue
wp_give_log
wp_give_migrations
wp_give_commentmeta
...
New WordPress options
widget_give_forms_widget
give_free_addon_modal_displayed
give_onboarding

Browser metrics Passed 4 tests

A check of browser resources used by GiveWP - Donation Plugin and Fundraising Platform
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,642 ▲88825.37 ▲9.9152.40 ▲42.483.88 ▲0.08
Dashboard /wp-admin3,651 ▲77212.22 ▲5.78473.42 ▲292.23321.54 ▲127.63
Posts /wp-admin/edit.php2,902 ▲2173.45 ▲0.01116.01 ▲29.53197.26 ▲22.79
Add New Post /wp-admin/post-new.php1,787 ▲15217.39 ▼1.18729.14 ▲67.87203.87 ▼19.56
Media Library /wp-admin/upload.php1,906 ▲2115.71 ▲0.01177.91 ▼7.16308.20 ▲70.03
Settings /wp-admin/edit.php?post_type=give_forms&page=give-settings3,6826.57147.55221.85
Menus /wp-admin/nav-menus.php2,5523.5896.93195.57
Reports /wp-admin/edit.php?post_type=give_forms&page=give-reports2,43812.25504.14528.98
/wp-admin/admin.php?page=give-form-preview2012.8341.7526.35
/wp-admin/admin.php?page=give-onboarding-wizard1,7773.66110.9054.44
Add-ons /wp-admin/edit.php?post_type=give_forms&page=give-add-ons3,0647.92213.75191.72
All Forms /wp-admin/edit.php?post_type=give_forms&page=give-forms1,7037.89263.08202.48
Tools /wp-admin/edit.php?post_type=give_forms&page=give-tools2,2296.02125.48201.75
Add Form /wp-admin/post-new.php?post_type=give_forms12,35920.75835.17348.51
Widgets /wp-admin/widgets.php2,61525.74912.19268.13

Uninstaller [IO: ▲45.18MB] [DB: ▲0.06MB] 25% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstaller has failed for this plugin, leaving 2,683 files (45.18MB) in the plugin directory
    • (new file) assets/dist/css/admin-setup.rtl.css
    • (new file) assets/dist/css/admin-paypal-commerce.rtl.css
    • (new file) assets/dist/css/admin-paypal-commerce.css
    • (new file) assets/dist/css/admin-global.css
    • (new file) .phpstorm.meta.php
    • (new file) assets/dist/css/admin-global.rtl.css
    • (new file) assets/dist/css/admin-shortcode-button.css
    • (new file) assets/dist/css/admin-block-editor.rtl.css
    • (new file) assets/dist/css/admin-setup.css
    • (new file) assets/dist/css/admin-block-editor.css
    • ...
  • Zombie tables were found after uninstall: 13 tables
    • wp_give_sequential_ordering
    • wp_give_commentmeta
    • wp_give_donors
    • wp_give_revenue
    • wp_give_subscriptions
    • wp_give_subscriptionmeta
    • wp_give_log
    • wp_give_donormeta
    • wp_give_donationmeta
    • wp_give_sessions
    • ...
  • Zombie WordPress options were found after uninstall: 3 options
    • give_onboarding
    • widget_give_forms_widget
    • give_free_addon_modal_displayed

Smoke tests 25% 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 | 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 take a closer look at the following
  • 108× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/example_007.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/example_018.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/barcodes/example_2d_qrcode_svgi.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/example_016.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/example_005.php
    • > /wp-content/plugins/give/src/Views/Form/Templates/Classic/resources/views/icon-defs.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/barcodes/example_1d_html.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/barcodes/example_2d_datamatrix_svg.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/example_044.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/example_056.php
  • 1160× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Base' not found in wp-content/plugins/give/vendor/fakerphp/faker/src/Faker/Provider/Barcode.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\PhoneNumber' not found in wp-content/plugins/give/vendor/fakerphp/faker/src/Faker/Provider/fa_IR/PhoneNumber.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Internet' not found in wp-content/plugins/give/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/Internet.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Person' not found in wp-content/plugins/give/vendor/fakerphp/faker/src/Faker/Provider/fa_IR/Person.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Give\\Framework\\Support\\Contracts\\Arrayable' not found in wp-content/plugins/give/src/Framework/Models/Model.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PayPalHttp\\HttpRequest' not found in wp-content/plugins/give/vendor/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Payments/AuthorizationsGetRequest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Company' not found in wp-content/plugins/give/vendor/fakerphp/faker/src/Faker/Provider/ar_SA/Company.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Give\\Framework\\PaymentGateways\\Commands\\GatewayCommand' not found in wp-content/plugins/give/src/Framework/PaymentGateways/Commands/RespondToBrowser.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/give/vendor/stripe/stripe-php/lib/Service/BalanceTransactionService.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Give\\Framework\\PaymentGateways\\Commands\\GatewayCommand' not found in wp-content/plugins/give/src/Framework/PaymentGateways/Commands/PaymentCommand.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=give_forms&page=give-tools
    • > Network (severe)
    wp-content/plugins/give/assets/dist/css/chosen-sprite.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=give-form-preview
    • > Network (severe)
    give/donation-form?giveDonationFormInIframe=1&page=give-form-preview - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: crowdfunding, fundraising, donation, donate, recurring donations

give/give.php Passed 13 tests

"GiveWP - Donation Plugin and Fundraising Platform" version 2.19.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
78 characters long description:
The most robust, flexible, and intuitive way to accept donations on WordPress.

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Please 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/give/vendor/stripe/stripe-php/data/ca-certificates.crt
      • wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/data/cert/tcpdf.crt
    • .xlsm - Excel Macro-Enabled Workbook in Microsoft Excel
      • wp-content/plugins/give/vendor/symfony/http-foundation/Tests/File/Fixtures/case-sensitive-mime-type.xlsm
317,078 lines of code in 2,508 files:
LanguageFilesBlank linesComment linesLines of code
PHP2,06954,085103,927277,882
Sass1281,72214715,336
SVG3211311,225
JavaScript2121,2651,0189,186
JSON3001,519
CSS38128141654
TypeScript73414616
XML4170281
YAML4481206
Pascal2417479
HTML60038
Markdown112027
make19027
Ruby1002

PHP code 0% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 4,412)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.02
▷ Minimum class complexity1.00
▷ Maximum class complexity4,412.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces361
Interfaces53
Traits65
Classes1,587
▷ Abstract classes513.21%
▷ Concrete classes1,53696.79%
▷ Final classes120.78%
Methods8,227
▷ Static methods1,59319.36%
▷ Public methods6,97284.75%
▷ Protected methods6668.10%
▷ Private methods5897.16%
Functions1,366
▷ Named functions1,08079.06%
▷ Anonymous functions28620.94%
Constants1,272
▷ Global constants15812.42%
▷ Class constants1,11487.58%
▷ Public constants1,114100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
57 PNG files occupy 3.35MB with 0.57MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dist/images/setup-page/stripe@2x.min.png2.94KB3.05KB0.00%
assets/dist/images/paypal.png3.07KB2.14KB▼ 30.34%
assets/dist/images/addons-admin-page-decor-1.png62.04KB29.32KB▼ 52.74%
assets/dist/images/credit.png1.10KB1.08KB▼ 1.60%
assets/dist/images/setup-page/form-fields-manager@2x.min.png1.15KB1.18KB0.00%