10% donate-extra

Code Review | Donate Extra

WordPress plugin Donate Extra scored 10% from 54 tests.

About plugin

  • Plugin page: donate-extra
  • Plugin version: 2.02
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.4.2
  • WordPress version: 5.9.2
  • First release: Oct 23, 2012
  • Latest release: Nov 16, 2012
  • Number of updates: 91
  • Update frequency: every 0.3 days
  • Top authors: justinesmithies (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 11,818 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/donate-extra/manage-dp.php+7
    Undefined index: page

Server metrics [RAM: ▼2.53MB] [CPU: ▼344.29ms] Passed 4 tests

An overview of server-side resources used by Donate Extra
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.84 ▼1.674.36 ▼44.95
Dashboard /wp-admin1.86 ▼1.553.96 ▼29.53
Posts /wp-admin/edit.php1.86 ▼1.785.04 ▼32.93
Add New Post /wp-admin/post-new.php1.86 ▼5.113.87 ▼1,269.75
Media Library /wp-admin/upload.php1.86 ▼1.433.63 ▼20.76
Donate Extra /wp-admin/admin.php?page=DonateExtra1.864.43
Settings /wp-admin/admin.php?page=donateextraSettings1.864.72

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 2 new options
New tables
wp_donations
New WordPress options
dextra_db_version
DonateExtra

Browser metrics Passed 4 tests

A check of browser resources used by Donate Extra
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,938 ▲18516.16 ▲0.468.70 ▲2.002.72 ▼0.11
Dashboard /wp-admin2,924 ▲706.14 ▼0.02127.29 ▼3.18163.34 ▲3.99
Posts /wp-admin/edit.php2,728 ▲373.24 ▲0.0164.48 ▼1.02139.72 ▼1.28
Add New Post /wp-admin/post-new.php1,686 ▲2516.91 ▲0.52405.64 ▼31.67157.75 ▲5.18
Media Library /wp-admin/upload.php1,734 ▲365.50 ▲0.01154.01 ▲10.62182.65 ▼8.79
Donate Extra /wp-admin/admin.php?page=DonateExtra1,3052.3853.78111.53
Settings /wp-admin/admin.php?page=donateextraSettings1,7202.4060.74219.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/donate-extra/manage-dp.php+7
    Undefined index: page
  • Zombie tables detected upon uninstall: 1 table
    • wp_donations
  • Zombie WordPress options were found after uninstall: 2 options
    • DonateExtra
    • dextra_db_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=DonateExtra
    • > Notice in wp-content/plugins/donate-extra/manage-dp.php+7
    Undefined index: doaction
    • > GET request to /wp-admin/admin.php?page=DonateExtra
    • > Notice in wp-content/plugins/donate-extra/manage-dp.php+7
    Undefined index: delete
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=donateextraSettings
    • > Notice in wp-content/plugins/donate-extra/manage-dp.php+10
    Undefined index: updatedonor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=donateextraSettings
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=donateextraSettings
    • > Notice in wp-content/plugins/donate-extra/donate-extra.php+63
    Undefined index: action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=donateextraSettings
    • > User deprecated in wp-includes/functions.php+5610
    load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=donateextraSettings
    • > User deprecated in wp-includes/functions.php+5600
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=DonateExtra
    • > Notice in wp-content/plugins/donate-extra/manage-dp.php+37
    Undefined index: edit
    • > GET request to /wp-admin/admin.php?page=DonateExtra
    • > Notice in wp-content/plugins/donate-extra/manage-dp.php+43
    Undefined index: s
    • > GET request to /wp-admin/admin.php?page=DonateExtra
    • > Notice in wp-content/plugins/donate-extra/manage-dp.php+187
    Undefined variable: total
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=DonateExtra
    • > Notice in wp-content/plugins/donate-extra/manage-dp.php+220
    Undefined variable: dn
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=DonateExtra
    • > Notice in wp-content/plugins/donate-extra/manage-dp.php+220
    Trying to get property 'currency' of non-object
    • > GET request to /wp-admin/admin.php?page=DonateExtra
    • > Notice in wp-content/plugins/donate-extra/manage-dp.php+188
    Undefined variable: paypal_total
    • > GET request to /wp-admin/admin.php?page=donateextraSettings
    • > Notice in wp-content/plugins/donate-extra/donate-extra.php+225
    Undefined index: notice
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=donateextraSettings
    • > Notice in wp-content/plugins/donate-extra/donate-extra.php+180
    Undefined variable: output
    • > GET request to /wp-admin/admin.php?page=donateextraSettings
    • > Notice in wp-content/plugins/donate-extra/donate-extra.php+264
    Undefined index: IPN_email

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/donate-extra/dextra-widget.php:155
    • > PHP Notice
      Undefined index: page in wp-content/plugins/donate-extra/manage-dp.php on line 7
    • > PHP Notice
      Undefined index: updatedonor in wp-content/plugins/donate-extra/manage-dp.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/donate-extra/dextra-widget.php:155

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Paypal Gross & Net Display), #2 (Manage Donations), #3 (Example of Donation Form), #4 (Example of Recognition Wall), #5 (Settings Panel)
You can look at the official readme.txt

donate-extra/donate-extra.php 92% from 13 tests

The primary PHP file in "Donate Extra" version 2.02 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,569 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP41571791,135
PO File2198433434

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity39.50
▷ Minimum class complexity19.00
▷ Maximum class complexity60.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.21MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png10.58KB6.17KB▼ 41.69%
screenshot-2.png36.86KB14.04KB▼ 61.90%
screenshot-5.png114.18KB47.47KB▼ 58.42%
screenshot-1.png44.72KB15.06KB▼ 66.33%
screenshot-4.png4.41KB2.95KB▼ 33.11%