93% fondy-rcp-gateway

Code Review | FONDY — Restrict Content Pro Payment Gateway integration

WordPress plugin FONDY — Restrict Content Pro Payment Gateway integration scored 93% from 54 tests.

About plugin

  • Plugin page: fondy-rcp-gateway
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 5.8.1
  • First release: May 10, 2018
  • Latest release: Aug 14, 2020
  • Number of updates: 20
  • Update frequency: every 41.4 days
  • Top authors: fondyeu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 739 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by FONDY — Restrict Content Pro Payment Gateway integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1240.31 ▲16.42
Dashboard /wp-admin3.07 ▲0.0145.32 ▼5.27
Posts /wp-admin/edit.php3.12 ▲0.0145.69 ▼7.40
Add New Post /wp-admin/post-new.php5.42 ▼0.0196.01 ▼573.88
Media Library /wp-admin/upload.php3.01 ▲0.0129.44 ▼8.09

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

FONDY — Restrict Content Pro Payment Gateway integration: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,718 ▲12215.80 ▲0.189.12 ▲0.5353.88 ▲0.38
Dashboard /wp-admin2,985 ▲545.84 ▼0.06129.61 ▼19.50108.10 ▼10.35
Posts /wp-admin/edit.php2,754 ▲182.70 ▲0.0065.86 ▼7.5194.44 ▼2.73
Add New Post /wp-admin/post-new.php1,625 ▼2,11921.29 ▲2.13288.47 ▼194.38115.33 ▲0.02
Media Library /wp-admin/upload.php1,825 ▲185.02 ▼0.01159.36 ▼7.95129.36 ▲7.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fondy-rcp-gateway/fondy/fondy-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/fondy-rcp-gateway/index.php:16

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


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: merchant, restrict content pro, payments, payment gateway, online payment

fondy-rcp-gateway/index.php 77% from 13 tests

This is the main PHP file of "FONDY — Restrict Content Pro Payment Gateway integration" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fondy-rcp-gateway.php" instead of "index.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected440 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity26.50
▷ Minimum class complexity9.00
▷ Maximum class complexity44.00
Average method complexity9.00
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods228.57%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions685.71%
▷ Anonymous functions114.29%
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.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
There are no PNG files in this plugin