68% easy-donations

Code Review | Easy Donations

WordPress plugin Easy Donations scored68%from 54 tests.

About plugin

  • Plugin page: easy-donations
  • Plugin version: 1.4.3.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 26, 2015
  • Latest release: Jan 1, 2017
  • Number of updates: 43
  • Update frequency: every 10.1 days
  • Top authors: f.n174 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,696 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 gracefully, with no errors

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

This is a short check of server-side resources used by Easy Donations
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.5948.80 ▲8.02
Dashboard /wp-admin4.06 ▲0.7161.19 ▲0.01
Posts /wp-admin/edit.php4.15 ▲0.7958.19 ▲9.75
Add New Post /wp-admin/post-new.php6.65 ▲0.7587.97 ▼13.17
Media Library /wp-admin/upload.php3.97 ▲0.7440.92 ▲2.27
Payments List /wp-admin/admin.php?page=edt_payments_info3.9438.85
Payments List /wp-admin/admin.php?page=edt_payments_page3.9743.15
General Settings /wp-admin/admin.php?page=edt_plugin_options3.9742.96

Server storage [IO: ▲0.25MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 29 new files
Database: 1 new table, 9 new options
New tables
wp_edt_payments
New WordPress options
widget_recent-comments
can_compress_scripts
widget_edt_widget
widget_theysaidso_widget
theysaidso_admin_options
easy_donations_options
recovery_mode_email_last_sent
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Easy Donations
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲19714.20 ▼0.051.80 ▲0.0645.64 ▲3.47
Dashboard /wp-admin2,367 ▲1906.15 ▲0.61116.98 ▲27.1242.32 ▼0.41
Posts /wp-admin/edit.php2,292 ▲1923.31 ▲1.3057.65 ▲23.7735.05 ▼0.33
Add New Post /wp-admin/post-new.php1,551 ▲1422.54 ▲4.38684.67 ▲63.3537.79 ▼29.78
Media Library /wp-admin/upload.php1,429 ▲294.19 ▲0.0194.84 ▼6.2349.23 ▲3.28
Payments List /wp-admin/admin.php?page=edt_payments_info7221.7114.1622.43
Payments List /wp-admin/admin.php?page=edt_payments_page1,2313.0440.3123.95
General Settings /wp-admin/admin.php?page=edt_plugin_options2,3823.2343.4162.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_edt_payments
  • The uninstall procedure has failed, leaving 9 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • easy_donations_options
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_edt_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=edt_payments_info
    • > Error in wp-content/plugins/easy-donations/inc/class-easy-donations-admin-payments.php+77
    Uncaught Error: Call to a member function prepare_items() on null in wp-content/plugins/easy-donations/inc/class-easy-donations-admin-payments.php:77
    Stack trace:
    #0 wp-content/plugins/easy-donations/inc/class-easy-donations-admin-payments.php(66): Easy_Donations_Admin_Payments->print_the_list()
    #1 wp-content/plugins/easy-donations/inc/class-easy-donations-admin-payments.php(52): Easy_Donations_Admin_Payments->choose_content()
    #2 wp-includes/class-wp-hook.php(310): Easy_Donations_Admin_Payments->edt_payments_page_content()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Donations_Settings_API' not found in wp-content/plugins/easy-donations/inc/abstract/class-easy-donations-settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-donations/inc/gateways/class-edt-pardakhtshahr-gateway.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'EDT_WP_List_Table' not found in wp-content/plugins/easy-donations/inc/class-easy-donations-admin-payments-list.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-donations/inc/gateways/class-edt-pardakhtpal-gateway.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Donations_Settings' not found in wp-content/plugins/easy-donations/inc/class-easy-donations-admin-payments.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Donations_DB' not found in wp-content/plugins/easy-donations/inc/class-easy-donations-payments.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-donations/inc/gateways/class-edt-parspal-gateway.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Donations_Settings' not found in wp-content/plugins/easy-donations/inc/class-easy-donations-admin-general.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-donations/inc/widgets/class-easy-donations-widgets.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-donations/inc/gateways/class-edt-novinpal-gateway.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% 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:
  • Requires at least: Invalid plugin version format
  • Donate link: Invalid URI found ("wp-src.ir")
You can look at the official readme.txt

easy-donations/easy-donations.php Passed 13 tests

"Easy Donations" version 1.4.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
83 characters long description:
Using this plugin you can let your users receives donations easily in their website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin4,125 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP227519103,355
PO File1226260487
CSS2410179
JavaScript1293104

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.59
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes14.55%
▷ Concrete classes2195.45%
▷ Final classes29.52%
Methods203
▷ Static methods41.97%
▷ Public methods18993.10%
▷ Protected methods62.96%
▷ Private methods83.94%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants725.93%
▷ Class constants2074.07%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/default.png14.45KB6.69KB▼ 53.66%