88% button-paypal-donation

Code Review | PayPal Donation Button

WordPress plugin PayPal Donation Button scored 88% from 54 tests.

About plugin

  • Plugin page: button-paypal-don...
  • Plugin version: 1.9.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.9
  • WordPress version: 5.9.2
  • First release: Jun 21, 2017
  • Latest release: Jan 23, 2022
  • Number of updates: 35
  • Update frequency: every 47.9 days
  • Top authors: excellentdynamics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,787 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼293.57ms] Passed 4 tests

A check of server-side resources used by PayPal Donation Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0154.53 ▲5.63
Dashboard /wp-admin3.42 ▲0.0133.17 ▼0.81
Posts /wp-admin/edit.php3.65 ▲0.0136.74 ▼0.50
Add New Post /wp-admin/post-new.php6.89 ▼0.08105.72 ▼1,173.88
Media Library /wp-admin/upload.php3.31 ▲0.0124.73 ▲0.92
PayPal Donation /wp-admin/options-general.php?page=button-paypal-donation/paypal-donation-button.php3.2722.14

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by PayPal Donation Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,771 ▲2716.24 ▲0.536.07 ▼0.372.34 ▲0.52
Dashboard /wp-admin2,897 ▲366.17 ▼0.04115.94 ▼14.95154.31 ▼5.76
Posts /wp-admin/edit.php2,693 ▼13.25 ▲0.0260.89 ▼0.78141.20 ▼0.48
Add New Post /wp-admin/post-new.php1,755 ▲8921.64 ▲0.84424.68 ▲13.63154.27 ▼2.77
Media Library /wp-admin/upload.php1,706 ▲85.54 ▲0.04133.93 ▲0.44195.75 ▲9.90
PayPal Donation /wp-admin/options-general.php?page=button-paypal-donation/paypal-donation-button.php1,4652.5457.98174.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/button-paypal-donation/paypal-donation-button.php:30

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
    • > GET request to /wp-admin/options-general.php?page=button-paypal-donation/paypal-donation-button.php
    • > Network (severe)
    wp-content/plugins/button-paypal-donation/images/blue-button-two.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=button-paypal-donation/paypal-donation-button.php
    • > Network (severe)
    wp-content/plugins/button-paypal-donation/images/blue-button-three.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=button-paypal-donation/paypal-donation-button.php
    • > Network (severe)
    wp-content/plugins/button-paypal-donation/images/blue-button-four.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=button-paypal-donation/paypal-donation-button.php
    • > Network (severe)
    wp-content/plugins/button-paypal-donation/images/light-button-one.png - Failed to load resource: the server responded with a status of 404 (Not Found)


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Screenshot #7 (Screenshot of option page all button avialable to lite version (27 buttons)) image not found
Please take inspiration from this readme.txt

button-paypal-donation/paypal-donation-button.php 92% from 13 tests

The main PHP script in "PayPal Donation Button" version 1.9.6 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("button-paypal-donation.php" instead of "paypal-donation-button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin434 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions13100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
16 PNG files occupy 1.43MB with 0.97MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-7.png389.05KB150.90KB▼ 61.21%
screenshot-4.png130.00KB47.86KB▼ 63.19%
screenshot-5.png151.45KB50.54KB▼ 66.63%
screenshot-1.png122.81KB39.25KB▼ 68.04%
images/donate-with-paypal-four.png83.31KB17.03KB▼ 79.56%