10% dynamic-donations

Code Review | Dynamic Donations

WordPress plugin Dynamic Donations scored10%from 54 tests.

About plugin

  • Plugin page: dynamic-donations
  • Plugin version: 1.2.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Jan 9, 2023
  • Latest release: Nov 28, 2023
  • Number of updates: 16
  • Update frequency: every 23.4 days
  • Top authors: pluginswithpurpose (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /286 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲0.15MB] [CPU: ▼12.05ms] Passed 4 tests

This is a short check of server-side resources used by Dynamic Donations
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.8143.85 ▲2.25
Dashboard /wp-admin4.19 ▲0.8849.89 ▼0.44
Posts /wp-admin/edit.php4.24 ▲0.8851.17 ▲2.89
Add New Post /wp-admin/post-new.php3.99 ▼1.8939.67 ▼52.89
Media Library /wp-admin/upload.php4.05 ▲0.8239.37 ▲5.74

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 524 new files
Database: 4 new tables, 7 new options
New tables
dydo_subscriptions
dydo_onetime_donations
dydo_gateways
dydo_subscription_donations
New WordPress options
dydo_options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Dynamic Donations
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,081 ▲29416.69 ▲2.34178.26 ▲176.14108.41 ▲64.52
Dashboard /wp-admin2,230 ▲565.57 ▼0.0886.36 ▼13.9637.23 ▼6.39
Posts /wp-admin/edit.php2,137 ▲372.03 ▲0.0136.58 ▼2.2134.40 ▼2.35
Add New Post /wp-admin/post-new.php1,539 ▲823.31 ▲0.39652.36 ▲19.5958.20 ▲6.98
Media Library /wp-admin/upload.php1,437 ▲434.19 ▼0.0697.04 ▼0.9543.56 ▲2.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure failed, leaving 4 tables in the database
    • dydo_gateways
    • dydo_subscriptions
    • dydo_onetime_donations
    • dydo_subscription_donations
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • dydo_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/build.php
    • > /wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/dynamic-donations/includes/admin/views/dydo-admin-display.php
  • 236× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/lib/Service/FinancialConnections/SessionService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/lib/Service/PaymentMethodService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/lib/BalanceTransaction.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/lib/TaxRate.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\OAuth\\OAuthErrorException' not found in wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidScopeException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/lib/OrderReturn.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/lib/Service/Issuing/AuthorizationService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/lib/Service/AccountService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/lib/LoginLink.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/lib/Service/Issuing/CardholderService.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: donations, donate, stripe, recurring donations, recurring...

dynamic-donations/dydo.php 92% from 13 tests

The main file in "Dynamic Donations" v. 1.2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("dynamic-donations.php" instead of "dydo.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/dynamic-donations/vendor/stripe/stripe-php/data/ca-certificates.crt
28,203 lines of code in 500 files:
LanguageFilesBlank linesComment linesLines of code
PHP3142,77311,01912,272
JavaScript1508272458,970
JSON5003,753
CSS5417511,892
Markdown469701,069
HTML21018121
SVG170065
XML10031
make19027
YAML1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.71
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces30
Interfaces11
Traits8
Classes274
▷ Abstract classes124.38%
▷ Concrete classes26295.62%
▷ Final classes00.00%
Methods1,022
▷ Static methods23122.60%
▷ Public methods92090.02%
▷ Protected methods343.33%
▷ Private methods686.65%
Functions39
▷ Named functions2564.10%
▷ Anonymous functions1435.90%
Constants779
▷ Global constants172.18%
▷ Class constants76297.82%
▷ Public constants762100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin