10% click-pledge-paid-memberships-pro

Code Review | Paid Memberships Pro Click & Pledge Gateway

WordPress plugin Paid Memberships Pro Click & Pledge Gateway scored10%from 54 tests.

About plugin

  • Plugin page: click-pledge-paid...
  • Plugin version: 4.23110000-WP6.4.1-P...
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2+
  • WordPress version: 6.3.1
  • First release: Jul 29, 2015
  • Latest release: Nov 23, 2023
  • Number of updates: 50
  • Update frequency: every 60.8 days
  • Top authors: ClickandPledge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,654 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/click-pledge-paid-memberships-pro/classes/class.pmprogateway_clickandpledge.php+3
    require_once(wp-content/plugins/paid-memberships-pro/classes/gateways/class.pmprogateway.php): failed to open stream: No such file or directory

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

This is a short check of server-side resources used by Paid Memberships Pro Click & Pledge Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.73 ▼5.60
Dashboard /wp-admin3.31 ▼0.0445.97 ▼17.03
Posts /wp-admin/edit.php3.36 ▲0.0046.90 ▲1.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.08 ▼7.65
Media Library /wp-admin/upload.php3.23 ▲0.0034.83 ▲0.70

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paid Memberships Pro Click & Pledge Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.74 ▲0.461.51 ▼0.1536.99 ▼7.26
Dashboard /wp-admin2,189 ▲155.62 ▼0.0593.30 ▲0.6739.01 ▼1.65
Posts /wp-admin/edit.php2,103 ▼01.94 ▼0.0140.45 ▼1.2736.61 ▲2.00
Add New Post /wp-admin/post-new.php1,526 ▼023.20 ▼0.40601.08 ▼56.2850.59 ▲1.43
Media Library /wp-admin/upload.php1,391 ▼94.20 ▲0.03100.44 ▲2.1242.83 ▲1.04

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
  • Screenshots: Please add an image for screenshot #1 (Settings page)
  • Plugin Name: Please specify the plugin name on the first line ( === click-pledge-paid-memberships-pro === )
You can take inspiration from this readme.txt

click-pledge-paid-memberships-pro/pmpro-click-pledge.php 77% from 13 tests

The primary PHP file in "Paid Memberships Pro Click & Pledge Gateway" version 4.23110000-WP6.4.1-P... is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "4.23110000-WP6.4.1-P...")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 273 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("click-pledge-paid-memberships-pro.php" instead of "pmpro-click-pledge.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,860 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24282432,367
XML110493

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 138)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity330.00
▷ Minimum class complexity330.00
▷ Maximum class complexity330.00
Average method complexity7.45
▷ Minimum method complexity1.00
▷ Maximum method complexity138.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods51
▷ Static methods3568.63%
▷ Public methods5098.04%
▷ Protected methods00.00%
▷ Private methods11.96%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
classes/image_3422.png3.51KB1.73KB▼ 50.58%
screenshot-1.png48.35KB18.01KB▼ 62.76%