90% pal-donation-button

Code Review | Donation Button For PayPal

WordPress plugin Donation Button For PayPal scored 90% from 54 tests.

About plugin

  • Plugin page: pal-donation-button
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0
  • WordPress version: 6.3.1
  • First release: Aug 2, 2016
  • Latest release: Jan 7, 2023
  • Number of updates: 30
  • Update frequency: every 78.3 days
  • Top authors: wpcodelibrary (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 5,740 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼15.46ms] Passed 4 tests

Analyzing server-side resources used by Donation Button For PayPal
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.19 ▼21.00
Dashboard /wp-admin3.31 ▲0.0148.50 ▼10.91
Posts /wp-admin/edit.php3.36 ▲0.0043.57 ▼13.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.59 ▼16.10
Media Library /wp-admin/upload.php3.23 ▲0.0032.97 ▲2.77

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Donation Button For PayPal
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.061.87 ▼0.3143.14 ▼7.66
Dashboard /wp-admin2,209 ▲215.90 ▲1.0199.52 ▼12.0139.67 ▼5.14
Posts /wp-admin/edit.php2,086 ▼32.01 ▲0.0139.91 ▼2.7934.42 ▼8.89
Add New Post /wp-admin/post-new.php1,534 ▲2023.36 ▲5.75648.88 ▲14.4860.72 ▲10.38
Media Library /wp-admin/upload.php1,385 ▼64.24 ▲0.1095.89 ▼6.8739.99 ▼3.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

pal-donation-button/pal-donation-button.php Passed 13 tests

"Donation Button For PayPal" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
82 characters long description:
Create your own PayPal buttons as many as you want as per your need in simple way.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin67 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3186567

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There are no PNG files in this plugin