10% give

Code Review | GiveWP - Donation Plugin and Fundraising Platform

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

About plugin

  • Plugin page: give
  • Plugin version: 3.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 7, 2015
  • Latest release: Nov 4, 2023
  • Number of updates: 345
  • Update frequency: every 9.2 days
  • Top authors: dlocc (62.03%)jason_the_adams (28.7%)webdevmattcrom (9.28%)

Code review

54 tests

User reviews

607 reviews

Install metrics

100,000+ active /6,141,951 total downloads

Benchmarks

Plugin footprint 22% 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+3560
    unlink(wp-content/uploads/give-payments.csv): No such file or directory

Server metrics [RAM: ▲2.92MB] [CPU: ▲29.39ms] Passed 4 tests

This is a short check of server-side resources used by GiveWP - Donation Plugin and Fundraising Platform
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.96 ▲2.4958.76 ▲15.82
Dashboard /wp-admin6.40 ▲3.06130.35 ▲65.42
Posts /wp-admin/edit.php6.42 ▲3.0676.64 ▲29.97
Add New Post /wp-admin/post-new.php9.40 ▲3.51120.89 ▲31.47
Media Library /wp-admin/upload.php6.27 ▲3.0576.02 ▲40.31
Scheduled Actions /wp-admin/tools.php?page=action-scheduler6.3874.93
Add-ons /wp-admin/edit.php?post_type=give_forms&page=give-add-ons6.36126.00
/wp-admin/admin.php?page=give-form-preview6.38155.31
Tools /wp-admin/edit.php?post_type=give_forms&page=give-tools6.7989.09
Donations /wp-admin/edit.php?post_type=give_forms&page=give-payment-history6.3671.28
Add Form /wp-admin/post-new.php?post_type=give_forms6.70112.57
Reports /wp-admin/edit.php?post_type=give_forms&page=give-reports6.3568.37
/wp-admin/admin.php?page=give-onboarding-wizard6.4775.04
All Forms /wp-admin/edit.php?post_type=give_forms&page=give-forms8.1986.75
Donors /wp-admin/edit.php?post_type=give_forms&page=give-donors6.3567.58

Server storage [IO: ▲63.03MB] [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 63.03MB)
Filesystem: 3,908 new files
Database: 17 new tables, 11 new options
New tables
wp_actionscheduler_claims
wp_give_donormeta
wp_give_revenue
wp_give_sequential_ordering
wp_give_log
wp_give_migrations
wp_give_subscriptionmeta
wp_give_donors
wp_actionscheduler_groups
wp_actionscheduler_logs
...
New WordPress options
widget_recent-comments
action_scheduler_hybrid_store_demarkation
db_upgraded
widget_give_forms_widget
widget_theysaidso_widget
give_onboarding
theysaidso_admin_options
schema-ActionScheduler_LoggerSchema
can_compress_scripts
schema-ActionScheduler_StoreSchema
...

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 /3,451 ▲70421.33 ▲6.9844.34 ▲42.6719.08 ▼24.28
Dashboard /wp-admin2,726 ▲54510.71 ▲5.00276.05 ▲162.5074.94 ▲32.97
Posts /wp-admin/edit.php2,199 ▲962.20 ▲0.2545.68 ▲10.4237.38 ▲1.45
Add New Post /wp-admin/post-new.php1,827 ▲29027.32 ▲4.15721.78 ▲71.2540.94 ▼13.03
Media Library /wp-admin/upload.php1,492 ▲894.23 ▲0.01105.14 ▲7.0943.77 ▲1.20
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,3372.0333.4831.95
Add-ons /wp-admin/edit.php?post_type=give_forms&page=give-add-ons1,8145.99120.6986.70
/wp-admin/admin.php?page=give-form-preview1742.3730.1112.27
Tools /wp-admin/edit.php?post_type=give_forms&page=give-tools1,6674.2567.7934.20
Donations /wp-admin/edit.php?post_type=give_forms&page=give-payment-history1,8057.14188.0370.66
Add Form /wp-admin/post-new.php?post_type=give_forms9,24021.28564.8591.46
Reports /wp-admin/edit.php?post_type=give_forms&page=give-reports1,7148.70349.76150.79
/wp-admin/admin.php?page=give-onboarding-wizard1,7022.7558.3422.01
All Forms /wp-admin/edit.php?post_type=give_forms&page=give-forms1,6777.87202.5051.65
Donors /wp-admin/edit.php?post_type=give_forms&page=give-donors1,5957.82186.9649.18

Uninstaller [IO: ▲63.02MB] [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 3,908 files (63.02MB) in the plugin directory
    • (new file) LICENSE
    • (new file) assets/dist/css/admin-paypal-commerce.css
    • (new file) assets/dist/css/admin-block-editor.css
    • (new file) assets/dist/css/admin-global.css
    • (new file) assets/dist/css/admin-setup.rtl.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-global.rtl.css
    • (new file) assets/dist/css/admin-paypal-commerce.rtl.css
    • (new file) assets/dist/css/admin-shortcode-button.css
    • ...
  • Zombie tables were found after uninstall: 17 tables
    • wp_give_subscriptions
    • wp_give_formmeta
    • wp_actionscheduler_actions
    • wp_give_subscriptionmeta
    • wp_give_comments
    • wp_actionscheduler_groups
    • wp_give_log
    • wp_give_donors
    • wp_give_revenue
    • wp_give_sequential_ordering
    • ...
  • Zombie WordPress options were found after uninstall: 12 options
    • give_onboarding
    • widget_recent-posts
    • theysaidso_admin_options
    • schema-ActionScheduler_LoggerSchema
    • db_upgraded
    • action_scheduler_hybrid_store_demarkation
    • widget_give_forms_widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • action_scheduler_migration_status
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=give_forms&page=give-payment-history
    • > Notice in wp-content/plugins/give/src/Framework/QueryBuilder/Concerns/Aggregate.php+30
    Trying to get property 'count' 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 take a closer look at the following
  • 109× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/example_062.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/barcodes/example_2d_qrcode_png.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/barcodes/example_1d_png.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_qrcode_html.php
    • > /wp-content/plugins/give/src/Views/Form/defaultLoadingView.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/example_005.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/example_023.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/example_046.php
    • > /wp-content/plugins/give/vendor/tecnickcom/tcpdf/examples/example_053.php
  • 1555× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Give\\Tracking\\Contracts\\TrackEvent' not found in wp-content/plugins/give/src/Tracking/Events/DonationMetricsTracking.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Give\\Framework\\Exceptions\\Primitives\\Exception' not found in wp-content/plugins/give/src/Framework/Blocks/Exceptions/ReferenceBlockNotFoundException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/give/vendor/stripe/stripe-php/lib/SubscriptionSchedule.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Give\\TestData\\Framework\\Provider\\RandomProvider' not found in wp-content/plugins/give/src/TestData/Framework/Provider/RandomGoal.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/give/vendor/vendor-prefixed/symfony/http-foundation/Tests/ServerBagTest.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Money\\MoneyFormatter' not found in wp-content/plugins/give/vendor/moneyphp/money/src/Formatter/IntlLocalizedDecimalFormatter.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Give\\Vendors\\Faker\\Provider\\Address' not found in wp-content/plugins/give/vendor/vendor-prefixed/fakerphp/faker/src/Faker/Provider/id_ID/Address.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Give\\Vendors\\Faker\\Provider\\Payment' not found in wp-content/plugins/give/vendor/vendor-prefixed/fakerphp/faker/src/Faker/Provider/en_GB/Payment.php:11
    • > PHP Notice
      Undefined variable: statsProgressBarColor in wp-content/plugins/give/src/Views/Form/Templates/Classic/resources/css/variables.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'Give\\Vendors\\Faker\\Provider\\Person' not found in wp-content/plugins/give/vendor/vendor-prefixed/fakerphp/faker/src/Faker/Provider/sr_RS/Person.php:11

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
    • > 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)
    • > 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)

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: fundraising, recurring donations, crowdfunding, donate, donation

give/give.php Passed 13 tests

"GiveWP - Donation Plugin and Fundraising Platform" version 3.1.1'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/vendor-prefixed/symfony/http-foundation/Tests/File/Fixtures/case-sensitive-mime-type.xlsm
388,824 lines of code in 3,700 files:
LanguageFilesBlank linesComment linesLines of code
PHP2,68962,978127,798317,050
Sass2112,67220320,669
TypeScript3992,0861,41816,980
SVG6731311,665
JavaScript2501,3741,06110,097
CSS562,7021679,691
JSON6002,164
XML5180300
Pascal2417479
JSX42045
HTML60038
make110029
YAML2009
Markdown1506
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,415)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 500)
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.81
▷ Minimum class complexity1.00
▷ Maximum class complexity4,415.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity500.00
Code structure
Namespaces515
Interfaces93
Traits80
Classes2,116
▷ Abstract classes793.73%
▷ Concrete classes2,03796.27%
▷ Final classes803.93%
Methods10,956
▷ Static methods1,99018.16%
▷ Public methods9,20684.03%
▷ Protected methods9778.92%
▷ Private methods7737.06%
Functions1,601
▷ Named functions1,14271.33%
▷ Anonymous functions45928.67%
Constants1,463
▷ Global constants15410.53%
▷ Class constants1,30989.47%
▷ Public constants1,30899.92%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
63 PNG files occupy 3.39MB with 1.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dist/images/setup-page/givewp101@2x.min.png2.06KB2.14KB0.00%
assets/dist/images/admin/template-preview-legacy.png40.01KB16.13KB▼ 59.69%
assets/dist/images/admin/template-preview-classic.png79.85KB34.02KB▼ 57.39%
assets/dist/images/give-logo-small.png4.67KB3.02KB▼ 35.43%
assets/dist/images/give-logo-large.png40.80KB24.55KB▼ 39.83%