58% total-donations

Code Review | Total Donations

WordPress plugin Total Donations scored58%from 54 tests.

About plugin

  • Plugin page: total-donations
  • Plugin version: 3.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 3, 2020
  • Latest release: Jul 26, 2020
  • Number of updates: 12
  • Update frequency: every 1.9 days
  • Top authors: binti76 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /13,308 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: ▲4.02MB] [CPU: ▲19.38ms] Passed 4 tests

Analyzing server-side resources used by Total Donations
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.81 ▲3.3456.46 ▲17.30
Dashboard /wp-admin7.54 ▲4.2474.29 ▲23.60
Posts /wp-admin/edit.php7.60 ▲4.2467.97 ▲16.62
Add New Post /wp-admin/post-new.php10.16 ▲4.27118.54 ▲20.00
Media Library /wp-admin/upload.php7.46 ▲4.2469.79 ▲35.05
Campaigns /wp-admin/admin.php?page=migla_campaign_page7.4462.69
Customize Theme /wp-admin/admin.php?page=migla_donation_custom_theme7.4462.75
Email Settings /wp-admin/admin.php?page=migla_donation_settings_page7.4462.76
Front End and Securities /wp-admin/admin.php?page=migla_donation_front_settings_page7.4458.48
Stripe Settings /wp-admin/admin.php?page=migla_stripe_setting_page7.4764.49
Form Options /wp-admin/admin.php?page=migla_donation_form_options_page7.47110.83
Paypal Settings /wp-admin/admin.php?page=migla_donation_paypal_settings_page7.4772.92
Online Donations /wp-admin/admin.php?page=migla_reports_page7.4556.61
Total Donations /wp-admin/admin.php?page=migla_donation_menu_page7.4471.32
Help /wp-admin/admin.php?page=migla_donation_help7.4456.47

Server storage [IO: ▲5.74MB] [DB: ▲0.03MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 295 new files
Database: 12 new tables, 8 new options
New tables
wp_migla_email
wp_migla_form_meta
wp_migla_form_field
wp_migla_campaign
wp_migla_languages
wp_migla_form
wp_migla_options
wp_migla_client_log
wp_migla_donation
wp_migla_redirect
...
New WordPress options
widget_totaldonations_bar_widget
widget_totaldonations_circle_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Total Donations
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,090 ▲32916.41 ▲2.04178.23 ▲176.4647.71 ▲7.29
Dashboard /wp-admin2,302 ▲1225.83 ▲0.1888.17 ▼8.5087.96 ▲47.07
Posts /wp-admin/edit.php2,224 ▲1242.43 ▲0.4735.83 ▼7.3238.63 ▼3.87
Add New Post /wp-admin/post-new.php1,784 ▲24921.16 ▲3.05586.27 ▼72.1835.77 ▼38.75
Media Library /wp-admin/upload.php1,517 ▲1174.40 ▲0.2596.17 ▼12.4885.52 ▲41.15
Campaigns /wp-admin/admin.php?page=migla_campaign_page1,2572.7541.1690.72
Customize Theme /wp-admin/admin.php?page=migla_donation_custom_theme3,3663.6384.94107.29
Email Settings /wp-admin/admin.php?page=migla_donation_settings_page1,3742.6639.2665.36
Front End and Securities /wp-admin/admin.php?page=migla_donation_front_settings_page1,2542.5931.8957.63
Stripe Settings /wp-admin/admin.php?page=migla_stripe_setting_page1,5773.6748.1844.71
Form Options /wp-admin/admin.php?page=migla_donation_form_options_page2,7682.5535.8053.32
Paypal Settings /wp-admin/admin.php?page=migla_donation_paypal_settings_page1,4933.6647.0648.02
Online Donations /wp-admin/admin.php?page=migla_reports_page1,0672.4036.5168.31
Total Donations /wp-admin/admin.php?page=migla_donation_menu_page1,3553.30112.3174.52
Help /wp-admin/admin.php?page=migla_donation_help9622.1929.7134.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 12 tables in the database
    • wp_migla_options
    • wp_migla_email_meta
    • wp_migla_client_log
    • wp_migla_languages
    • wp_migla_redirect
    • wp_migla_campaign
    • wp_migla_donation
    • wp_migla_form_field
    • wp_migla_form
    • wp_migla_form_meta
    • ...
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_totaldonations_bar_widget
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_totaldonations_circle_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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 perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/update_certs.php
    • > /wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/build.php
  • 104× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/lib/AlipayAccount.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/lib/Coupon.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/lib/Review.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/lib/OrderReturn.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\StripeObject' not found in wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/lib/OrderItem.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/lib/BalanceTransaction.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Error\\Base' not found in wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/lib/Error/Idempotency.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/lib/BitcoinReceiver.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/lib/ExchangeRate.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/lib/Terminal/ConnectionToken.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
Please take inspiration from this readme.txt

total-donations/migla-donations.php 85% from 13 tests

Analyzing the main PHP file in "Total Donations" version 3.0.8
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("total-donations.php" instead of "migla-donations.php")

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 fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/total-donations/gateways/stripe/stripe-php-6.43.0/data/ca-certificates.crt
67,654 lines of code in 239 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript277,56611,20431,917
PHP1695,4433,71925,099
CSS117561934,960
PO File29021,1261,937
Sass1323241,256
LESS1323331,247
Markdown23010681
SVG100520
JSON10037

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.87
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces12
Interfaces2
Traits7
Classes149
▷ Abstract classes74.70%
▷ Concrete classes14295.30%
▷ Final classes00.00%
Methods657
▷ Static methods19229.22%
▷ Public methods61092.85%
▷ Protected methods192.89%
▷ Private methods284.26%
Functions76
▷ Named functions7497.37%
▷ Anonymous functions22.63%
Constants509
▷ Global constants91.77%
▷ Class constants50098.23%
▷ Public constants500100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
24 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/back_disabled.png1.33KB0.60KB▼ 55.11%
assets/images/circle-right-text-right.png4.20KB1.38KB▼ 67.05%
assets/images/circle-left-text-left.png4.10KB1.41KB▼ 65.74%
assets/images/details_open.png0.86KB0.80KB▼ 6.92%
assets/images/circle-no-html-1.png4.00KB1.28KB▼ 68.02%