84% custom-donations

Code Review | Custom Donations

WordPress plugin Custom Donations scored84%from 54 tests.

About plugin

  • Plugin page: custom-donations
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.2
  • WordPress version: 6.3.1
  • First release: Nov 15, 2016
  • Latest release: Feb 7, 2017
  • Number of updates: 9
  • Update frequency: every 8.6 days
  • Top authors: peterbreen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,741 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼11.24ms] Passed 4 tests

This is a short check of server-side resources used by Custom Donations
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0437.77 ▼5.13
Dashboard /wp-admin3.41 ▲0.0250.41 ▼17.60
Posts /wp-admin/edit.php3.52 ▲0.1352.98 ▼0.00
Add New Post /wp-admin/post-new.php5.99 ▲0.0690.34 ▼14.89
Media Library /wp-admin/upload.php3.33 ▲0.0634.46 ▼7.35

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Custom Donations
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.37 ▲0.021.73 ▲0.0340.70 ▼4.49
Dashboard /wp-admin2,216 ▲395.53 ▼0.1384.01 ▼9.3537.97 ▼9.09
Posts /wp-admin/edit.php2,121 ▲212.03 ▲0.0236.01 ▼1.0633.22 ▼5.51
Add New Post /wp-admin/post-new.php1,549 ▲2323.21 ▲0.16622.21 ▼68.6357.60 ▼4.94
Media Library /wp-admin/upload.php1,418 ▲184.21 ▲0.04103.64 ▼9.8845.04 ▼4.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/custom-donations/templates/single-form.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === custom-donations === )
You can look at the official readme.txt

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

The entry point to "Custom Donations" version 1.2.4 is a PHP file that has certain tags in its header comment area
89 characters long description:
A plugin for organizations to accept both one-time and recurring donations through Paypal

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected503 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP51726483
CSS111120

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png43.79KB18.00KB▼ 58.89%
assets/screenshot-1.png31.45KB12.83KB▼ 59.22%