83% fcf-pay-payment-gateway

Code Review | FCF-Pay

WordPress plugin FCF-Pay scored83%from 54 tests.

About plugin

  • Plugin page: fcf-pay-payment-g...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 16, 2022
  • Latest release: Dec 30, 2022
  • Number of updates: 20
  • Update frequency: every 14.8 days
  • Top authors: fcfpaycom (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

20+ active /671 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Server-side resources used by FCF-Pay
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.87 ▼2.98
Dashboard /wp-admin3.32 ▲0.0252.44 ▲4.33
Posts /wp-admin/edit.php3.37 ▲0.0149.39 ▲2.32
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.50 ▲6.33
Media Library /wp-admin/upload.php3.24 ▲0.0135.79 ▲1.05

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

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

Browser metrics Passed 4 tests

FCF-Pay: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.171.73 ▼0.0739.95 ▼3.83
Dashboard /wp-admin2,209 ▲215.91 ▲0.05110.15 ▼7.4941.21 ▼1.40
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0239.43 ▲3.8736.35 ▼0.51
Add New Post /wp-admin/post-new.php1,533 ▼023.17 ▲0.12626.28 ▼11.7052.07 ▼3.73
Media Library /wp-admin/upload.php1,391 ▲94.29 ▲0.0095.29 ▼3.5740.77 ▼3.54

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/fcf-pay-payment-gateway/core/includes/classes/class-fcf-pay-order-paid.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fcf-pay-payment-gateway/core/includes/classes/class-fcf-pay-order-status.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)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Requires php: The plugin version is formatted incorrectly
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

fcf-pay-payment-gateway/fcf-pay.php 85% from 13 tests

The entry point to "FCF-Pay" version 1.1.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fcf-pay-payment-gateway.php" instead of "fcf-pay.php")

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
Everything looks great! No dangerous files found in this plugin804 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10219360764
JavaScript2105836
CSS2164

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity13.25
▷ Minimum class complexity2.00
▷ Maximum class complexity30.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods44
▷ Static methods12.27%
▷ Public methods4193.18%
▷ Protected methods00.00%
▷ Private methods36.82%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
core/includes/assets/images/logo.png24.00KB10.34KB▼ 56.91%