84% paypal-donation

Code Review | Paypal Donation

WordPress plugin Paypal Donation scored 84% from 54 tests.

About plugin

  • Plugin page: paypal-donation
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.3
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Aug 19, 2015
  • Number of updates: 30
  • Update frequency: every 18.8 days
  • Top authors: vinoth06 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active / 12,919 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.06ms] 75% from 4 tests

A check of server-side resources used by Paypal Donation
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,729.06ms on /wp-admin/options-general.php?page=paypal-donation/paypal-donation.php)
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.00 ▼6.65
Dashboard /wp-admin3.33 ▲0.0245.38 ▼2.72
Posts /wp-admin/edit.php3.38 ▲0.0245.96 ▼3.83
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.32 ▼15.05
Media Library /wp-admin/upload.php3.25 ▲0.0235.94 ▲1.47
Paypal Donation /wp-admin/options-general.php?page=paypal-donation/paypal-donation.php4.021,729.06

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_buffercode_paypal_donation_info
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Paypal Donation: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.26 ▼1.331.69 ▲0.0539.12 ▼3.27
Dashboard /wp-admin2,207 ▲165.83 ▼0.06101.92 ▼5.9240.10 ▼2.48
Posts /wp-admin/edit.php2,090 ▼22.06 ▲0.0539.54 ▼3.9838.03 ▲3.26
Add New Post /wp-admin/post-new.php1,536 ▲323.22 ▼0.11659.18 ▼9.6352.57 ▼6.54
Media Library /wp-admin/upload.php1,392 ▲74.17 ▼0.0494.88 ▼7.6243.58 ▼2.08
Paypal Donation /wp-admin/options-general.php?page=paypal-donation/paypal-donation.php1,0291.9225.2728.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_buffercode_paypal_donation_info

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× 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/paypal-donation/paypal-donation.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (PayPal Donation below 40 percentage status message), #2 (PayPal Donation between 41 to 75 percentage status message), #3 (PayPal Donation above 75 percentage status message), #4 (PayPal Donation Option page), #5 (PayPal Donation widget page)
You can take inspiration from this readme.txt

paypal-donation/paypal-donation.php Passed 13 tests

The principal PHP file in "Paypal Donation" v. 1.4 is loaded by WordPress automatically on each request
127 characters long description:
This PayPal Donation WordPress Plugin gives high level of flexible to admin to share some of the real information for donation.

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
Good job! No executable or dangerous file extensions detected293 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14615274
JavaScript15119

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity7.25
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/1.png34.39KB13.93KB▼ 59.50%
images/3.png37.04KB10.69KB▼ 71.12%
images/2.png42.83KB16.29KB▼ 61.97%