88% payflexi-lifterlms-installment-payment-gateway

Code Review | PayFlexi Installment Payment Plans for LifterLMS

WordPress plugin PayFlexi Installment Payment Plans for LifterLMS scored88%from 54 tests.

About plugin

  • Plugin page: payflexi-lifterlm...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.0.2
  • WordPress version: 6.3.1
  • First release: Mar 16, 2021
  • Latest release: Sep 7, 2022
  • Number of updates: 9
  • Update frequency: every 60.1 days
  • Top authors: payflexi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /715 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by PayFlexi Installment Payment Plans for LifterLMS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0243.16 ▼1.29
Dashboard /wp-admin3.37 ▼0.0251.10 ▼15.11
Posts /wp-admin/edit.php3.48 ▲0.0849.04 ▼4.67
Add New Post /wp-admin/post-new.php5.95 ▲0.0286.76 ▼9.74
Media Library /wp-admin/upload.php3.29 ▲0.0240.27 ▲2.04

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for PayFlexi Installment Payment Plans for LifterLMS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.28 ▼0.021.95 ▲0.1839.94 ▼0.43
Dashboard /wp-admin2,198 ▲235.63 ▲0.03110.77 ▲0.1447.75 ▲4.53
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0236.55 ▼0.8635.29 ▼1.02
Add New Post /wp-admin/post-new.php1,528 ▲223.17 ▲0.05696.43 ▲9.6357.82 ▲3.41
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.0299.36 ▼7.2849.60 ▲5.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

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 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

payflexi-lifterlms-installment-payment-gateway/lifterlms-gateway-payflexi.php 62% from 13 tests

"PayFlexi Installment Payment Plans for LifterLMS" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payflexi-lifterlms-installment-payment-gateway.php" instead of "lifterlms-gateway-payflexi.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 161 characters long)
  • Domain Path: The domain path points to an invalid folder, "/i18n" does not exist
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.2" instead of "5.1")

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
There were no executable files found in this plugin612 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7214286540
Markdown129072

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity17.67
▷ Minimum class complexity5.00
▷ Maximum class complexity31.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods22
▷ Static methods14.55%
▷ Public methods1986.36%
▷ Protected methods14.55%
▷ Private methods29.09%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon.png6.68KB4.22KB▼ 36.80%