83% pmp-fondy-payment

Code Review | Fondy — Paid memberships Pro Payment Gateway

WordPress plugin Fondy — Paid memberships Pro Payment Gateway scored 83% from 54 tests.

About plugin

  • Plugin page: pmp-fondy-payment
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-6.0.1
  • WordPress version: 6.3.1
  • First release: May 8, 2018
  • Latest release: Jul 20, 2022
  • Number of updates: 27
  • Update frequency: every 56.9 days
  • Top authors: fondyeu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 2,217 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Analyzing server-side resources used by Fondy — Paid memberships Pro Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.49 ▼5.05
Dashboard /wp-admin3.31 ▲0.0044.09 ▼5.25
Posts /wp-admin/edit.php3.36 ▲0.0049.17 ▼4.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.89 ▼10.35
Media Library /wp-admin/upload.php3.23 ▲0.0034.35 ▼3.45

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Fondy — Paid memberships Pro Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.18 ▼1.161.88 ▲0.0241.56 ▼0.21
Dashboard /wp-admin2,206 ▲185.90 ▲0.98105.37 ▲3.3042.27 ▼0.70
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0240.38 ▼1.0136.02 ▲1.79
Add New Post /wp-admin/post-new.php1,545 ▲318.60 ▲0.45602.13 ▲0.5255.38 ▼1.88
Media Library /wp-admin/upload.php1,391 ▲64.18 ▼0.03101.89 ▼4.9644.83 ▲0.19

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      fclose() expects parameter 1 to be resource, bool given in wp-content/plugins/pmp-fondy-payment/services/fondy-ins.php on line 130
    • > PHP Notice
      Undefined variable: gateway in wp-content/plugins/pmp-fondy-payment/views/payment-option-fields.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pmp-fondy-payment/views/payment-option-fields.php:8
    • > PHP Warning
      fwrite() expects parameter 1 to be resource, bool given in wp-content/plugins/pmp-fondy-payment/services/fondy-ins.php on line 129
    • > PHP Warning
      fopen(wp-content/plugins/pmp-fondy-payment/services/../logs/fondy.txt): failed to open stream: No such file or directory in /var/www/wordpress/wp-content/plugins/pmp-fondy-payment/services/fondy-ins.php on line 128
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pmp-fondy-payment/views/submit-button.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmp-fondy-payment/services/services.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PMProGateway' not found in wp-content/plugins/pmp-fondy-payment/classes/class.pmprogateway_fondy.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% 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 need to be fixed:
  • Screenshots: These screenshots lack descriptions #10, #3, #4, #5, #6, #7, #8, #9 in pmp-fondy-payment/assets to your readme.txt
You can look at the official readme.txt

pmp-fondy-payment/pmpro-fondy-gateway.php 85% from 13 tests

This is the main PHP file of "Fondy — Paid memberships Pro Payment Gateway" version 1.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pmp-fondy-payment.php" instead of "pmpro-fondy-gateway.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.5" instead of "2.5")

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
No dangerous file extensions were detected646 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7140153588
PO File1141741
JavaScript141317

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity14.00
▷ Minimum class complexity5.00
▷ Maximum class complexity23.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods1575.00%
▷ Public methods1890.00%
▷ Protected methods00.00%
▷ Private methods210.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants430.77%
▷ Class constants969.23%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin