51% wp-fundraising-donation

Code Review | FundEngine – Donation and Crowdfunding Platform

WordPress plugin FundEngine – Donation and Crowdfunding Platform scored51%from 54 tests.

About plugin

  • Plugin page: wp-fundraising-do...
  • Plugin version: 1.6.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2019
  • Latest release: Sep 27, 2023
  • Number of updates: 78
  • Update frequency: every 19.4 days
  • Top authors: ataurr (92.31%)xpeedstudio (6.41%)wpmet (3.85%)

Code review

54 tests

User reviews

21 reviews

Install metrics

2,000+ active /43,886 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▲0.72ms] Passed 4 tests

An overview of server-side resources used by FundEngine – Donation and Crowdfunding Platform
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1546.24 ▲5.86
Dashboard /wp-admin3.44 ▲0.1455.82 ▲2.75
Posts /wp-admin/edit.php3.56 ▲0.2156.71 ▲6.28
Add New Post /wp-admin/post-new.php6.18 ▲0.2992.52 ▼4.59
Media Library /wp-admin/upload.php3.37 ▲0.1438.35 ▼1.15
Reports /wp-admin/edit.php?post_type=wp-fundraising&page=report3.3236.46
Categories /wp-admin/edit-tags.php?taxonomy=wfp-categories&post_type=wp-fundraising3.3638.31
Tags /wp-admin/edit-tags.php?taxonomy=wfp-tags&post_type=wp-fundraising3.3645.11
Settings /wp-admin/edit.php?post_type=wp-fundraising&page=settings3.4037.30
Add Campaign /wp-admin/post-new.php?post_type=wp-fundraising3.5652.81
Donations /wp-admin/edit.php?post_type=wp-fundraising&page=donations3.5536.70
All Campaigns /wp-admin/edit.php?post_type=wp-fundraising3.4140.72

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 572 new files
Database: 2 new tables, 8 new options
New tables
wp_wdp_fundraising_meta
wp_wdp_fundraising
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
wfp_general_options_data
can_compress_scripts
widget_recent-comments
wfp_fundraising_version
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for FundEngine – Donation and Crowdfunding Platform
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,065 ▲30414.55 ▲0.2613.77 ▲12.0952.69 ▲12.88
Dashboard /wp-admin2,294 ▲1145.29 ▼0.4092.81 ▲2.1972.78 ▲34.20
Posts /wp-admin/edit.php2,219 ▲1192.39 ▲0.3740.27 ▲4.4662.12 ▲21.66
Add New Post /wp-admin/post-new.php1,637 ▲10423.71 ▲0.59705.64 ▲16.6238.20 ▼17.84
Media Library /wp-admin/upload.php1,506 ▲1064.88 ▲0.71103.27 ▼12.1281.75 ▲33.10
Reports /wp-admin/edit.php?post_type=wp-fundraising&page=report1,9563.5840.1267.30
Categories /wp-admin/edit-tags.php?taxonomy=wfp-categories&post_type=wp-fundraising1,3902.3229.7563.67
Tags /wp-admin/edit-tags.php?taxonomy=wfp-tags&post_type=wp-fundraising1,3712.6335.3059.99
Settings /wp-admin/edit.php?post_type=wp-fundraising&page=settings9621.7712.3032.75
Add Campaign /wp-admin/post-new.php?post_type=wp-fundraising2,8633.6949.4856.99
Donations /wp-admin/edit.php?post_type=wp-fundraising&page=donations1,3352.2335.5748.71
All Campaigns /wp-admin/edit.php?post_type=wp-fundraising1,2292.7635.5662.40

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
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_wdp_fundraising
    • wp_wdp_fundraising_meta
  • The uninstall procedure has failed, leaving 8 options in the database
    • wfp_fundraising_version
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wfp_general_options_data

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 15× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/wp-fundraising-donation/views/public/fundraising/single-page/include/partials/amount-in-radio.php
    • > /wp-content/plugins/wp-fundraising-donation/apps/payment/autoload.php
    • > /wp-content/plugins/wp-fundraising-donation/apps/gallery.php
    • > /wp-content/plugins/wp-fundraising-donation/apps/menu.php
    • > /wp-content/plugins/wp-fundraising-donation/views/public/donation/include/content/amount-in-radio.php
    • > /wp-content/plugins/wp-fundraising-donation/apps/elementor/widgets/listing.php
    • > /wp-content/plugins/wp-fundraising-donation/payment-module/views/include/payment-popup-box.php
    • > /wp-content/plugins/wp-fundraising-donation/views/public/fundraising/single-page/include/partials/limit_details.php
    • > /wp-content/plugins/wp-fundraising-donation/apps/elementor/widgets/donate.php
    • > /wp-content/plugins/wp-fundraising-donation/apps/payment/setup.php
  • 402× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wp-fundraising-donation/apps/payment/application/stripe/stripe-php/lib/Service/EventService.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-fundraising-donation/views/admin/fundraising/reports/include/goal-reports.php:3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-fundraising-donation/views/public/fundraising/single-page/include/partials/amount-in-radio.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wp-fundraising-donation/apps/payment/application/stripe/stripe-php/lib/Service/BalanceTransactionService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wp-fundraising-donation/apps/payment/application/stripe/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wp-fundraising-donation/apps/payment/application/stripe/stripe-php/lib/Service/Issuing/TransactionService.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-fundraising-donation/views/public/fundraising/dynamic-page/checkout.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wp-fundraising-donation/apps/payment/application/stripe/stripe-php/lib/PaymentMethod.php:57
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wp-fundraising-donation/apps/payment/application/stripe/stripe-php/lib/Subscription.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/wp-fundraising-donation/views/public/donation/donation-page-short-code.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wp-fundraising
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:11743 Uncaught Error: Syntax error, unrecognized expression: .xs-donate-metabox-div > div#038;page=settings

Optimizations

Plugin configuration 83% 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
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (fundraisng design), #2 (fundraisng added from backend), #3 (Reward added from backend), #4 (Updates added from backend), #5 (Campaign list from front-end), #6 (User information from front-end), #7 (User address from front-end), #8 (Crowdfunding open from front-end), #9 (Crowdfunding reward from front-end), #10 (simple donate button), #11 (Donation form 1), #12 (Donation form 2), #13 (Donation setup), #14 (Donation level)
  • Tags: Please delete some tags, you are using 20 tag instead of maximum 10
You can look at the official readme.txt

wp-fundraising-donation/wp-fundraising.php 77% from 13 tests

Analyzing the main PHP file in "FundEngine – Donation and Crowdfunding Platform" version 1.6.4
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-fundraising-donation.php" instead of "wp-fundraising.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 226 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Please make sure to remedy the following
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/wp-fundraising-donation/apps/payment/application/stripe/stripe-php/data/ca-certificates.crt
43,979 lines of code in 532 files:
LanguageFilesBlank linesComment linesLines of code
PHP4667,99413,77440,302
Markdown278501,550
SVG8061,387
Sass18713607
JSON10048
XML1145031
CSS3001730
JavaScript2302024

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.48
▷ Minimum class complexity1.00
▷ Maximum class complexity456.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces52
Interfaces9
Traits10
Classes307
▷ Abstract classes113.58%
▷ Concrete classes29696.42%
▷ Final classes10.34%
Methods1,234
▷ Static methods25920.99%
▷ Public methods1,10589.55%
▷ Protected methods564.54%
▷ Private methods735.92%
Functions42
▷ Named functions1842.86%
▷ Anonymous functions2457.14%
Constants1,128
▷ Global constants40.35%
▷ Class constants1,12499.65%
▷ Public constants1,124100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/menu-icon.png1.70KB0.95KB▼ 43.84%
views/welcome/image/screenshot-welcome.png32.01KB12.43KB▼ 61.18%
assets/admin/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.32KB0.18KB▼ 44.00%
assets/admin/images/ui-bg_glass_75_dadada_1x400.png0.32KB0.16KB▼ 50.46%
assets/admin/images/ui-bg_glass_75_e6e6e6_1x400 (1).png0.32KB0.15KB▼ 53.40%