68% pp-recurring-payment

Code Review | Paypal Recurring Payment

WordPress plugin Paypal Recurring Payment scored68%from 54 tests.

About plugin

  • Plugin page: pp-recurring-payment
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Feb 11, 2016
  • Latest release: Mar 26, 2020
  • Number of updates: 8
  • Update frequency: every 189.6 days
  • Top authors: noxonsu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,384 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Paypal Recurring Payment
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.60 ▼5.66
Dashboard /wp-admin3.31 ▲0.0145.44 ▼3.04
Posts /wp-admin/edit.php3.36 ▲0.0048.62 ▼0.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.71 ▼20.64
Media Library /wp-admin/upload.php3.23 ▲0.0033.61 ▼2.16

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: 1 new table, 6 new options
New tables
wp_transactions
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paypal Recurring Payment
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12613.62 ▼1.136.77 ▲4.6437.02 ▼4.88
Dashboard /wp-admin2,206 ▲174.86 ▼0.06111.49 ▼9.4942.02 ▲1.09
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0439.49 ▼0.8536.36 ▲1.73
Add New Post /wp-admin/post-new.php1,533 ▲1922.94 ▲5.42576.19 ▼115.3058.79 ▲0.78
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.08100.49 ▼5.6440.32 ▼6.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 tables were found after uninstall: 1 table
    • wp_transactions
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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

SRP 0% 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
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/pp-recurring-payment/assets/paynotify.php
    • > /wp-content/plugins/pp-recurring-payment/assets/paycancel.php
    • > /wp-content/plugins/pp-recurring-payment/assets/payreturn.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pp-recurring-payment/fmrFinance.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pp-recurring-payment/assets/customizer.php:81

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === pp-recurring-payment === )
The official readme.txt is a good inspiration

pp-recurring-payment/fmrFinance.php 92% from 13 tests

The main PHP script in "Paypal Recurring Payment" version 1.01 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pp-recurring-payment.php" instead of "fmrFinance.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected268 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP51334257
CSS1006
JavaScript1105

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Constants2
▷ Global constants2100.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
No PNG files were detected