84% simple-paypal-recurring-donations

Code Review | Simple PayPal Recurring Donations

WordPress plugin Simple PayPal Recurring Donations scored84%from 54 tests.

About plugin

  • Plugin page: simple-paypal-rec...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 6.3.1
  • First release: Jul 2, 2019
  • Latest release: Jul 5, 2019
  • Number of updates: 10
  • Update frequency: every 0.3 days
  • Top authors: yknivag (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /730 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.51ms] Passed 4 tests

This is a short check of server-side resources used by Simple PayPal Recurring Donations
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.57 ▼3.76
Dashboard /wp-admin3.42 ▲0.1248.02 ▼3.23
Posts /wp-admin/edit.php3.47 ▲0.1249.38 ▲2.39
Add New Post /wp-admin/post-new.php6.02 ▲0.1497.51 ▼0.58
Media Library /wp-admin/upload.php3.34 ▲0.1237.31 ▼2.48

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
sprdntplgn_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple PayPal Recurring Donations
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲13113.51 ▼0.848.11 ▲5.7343.25 ▼1.93
Dashboard /wp-admin2,215 ▲385.69 ▲0.0486.58 ▲0.8843.17 ▼0.25
Posts /wp-admin/edit.php2,120 ▲201.98 ▼0.0142.06 ▲5.0635.46 ▼6.21
Add New Post /wp-admin/post-new.php1,543 ▲1723.27 ▲0.08655.31 ▼18.3853.96 ▼1.82
Media Library /wp-admin/upload.php1,423 ▲234.31 ▲0.1098.23 ▼14.2941.37 ▼7.53

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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • sprdntplgn_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/simple-paypal-recurring-donations/simple-paypal-recurring-donations.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Basic Implementation with no options ([sprdntplgn])), #2 (Full form with everything enabled ([sprdntplgn presets="5.00:M|7.50:M|10.00:M" one-off=1])), #3 (Simple "bespoke" section ([sprdntplgn bespoke="simple"]))
You can look at the official readme.txt

simple-paypal-recurring-donations/simple-paypal-recurring-donations.php Passed 13 tests

The primary PHP file in "Simple PayPal Recurring Donations" version 1.0.3 is used by WordPress to initiate all plugin functionality
70 characters long description:
Plugin for accepting recurring PayPal donations via a simple shortcode

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
There were no executable files found in this plugin550 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13738453
CSS118584
JavaScript10113

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png20.74KB8.95KB▼ 56.87%
screenshot-3.png6.86KB3.29KB▼ 52.06%
screenshot-1.png10.74KB4.92KB▼ 54.16%