89% payflexi-split-payment-gateway

Code Review | PayFlexi Payment Plans & Shareable Checkout for WooCommerce

WordPress plugin PayFlexi Payment Plans & Shareable Checkout for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: payflexi-split-pa...
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-5.8
  • WordPress version: 6.3.1
  • First release: May 12, 2020
  • Latest release: Dec 3, 2021
  • Number of updates: 18
  • Update frequency: every 31.7 days
  • Top authors: payflexi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,329 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.57ms] Passed 4 tests

An overview of server-side resources used by PayFlexi Payment Plans & Shareable Checkout for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.24 ▼5.11
Dashboard /wp-admin3.39 ▲0.0948.09 ▼1.05
Posts /wp-admin/edit.php3.50 ▲0.1551.58 ▲2.77
Add New Post /wp-admin/post-new.php5.97 ▲0.0895.20 ▼18.87
Media Library /wp-admin/upload.php3.31 ▲0.0847.86 ▲12.04

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by PayFlexi Payment Plans & Shareable Checkout for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲5113.21 ▼1.474.29 ▲2.2251.17 ▲4.97
Dashboard /wp-admin2,214 ▲264.83 ▼0.07110.15 ▲2.4242.75 ▼1.52
Posts /wp-admin/edit.php2,096 ▲41.97 ▼0.0339.33 ▼3.7236.40 ▲1.19
Add New Post /wp-admin/post-new.php1,541 ▲13023.21 ▲5.26644.05 ▲20.2350.94 ▲3.60
Media Library /wp-admin/upload.php1,393 ▲24.22 ▲0.00100.41 ▲3.2943.39 ▲1.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive 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, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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 require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

payflexi-split-payment-gateway/init.php 77% from 13 tests

This is the main PHP file of "PayFlexi Payment Plans & Shareable Checkout for WooCommerce" version 1.4.0, 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:
  • Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("4.7" instead of "3.8.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("payflexi-split-payment-gateway.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,107 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6167270760
CSS1234238
JavaScript2231109

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity31.50
▷ Minimum class complexity3.00
▷ Maximum class complexity72.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods12.50%
▷ Public methods3792.50%
▷ Protected methods00.00%
▷ Private methods37.50%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.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
5 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-icon-white.png35.93KB12.00KB▼ 66.61%
assets/images/payflexi-logo-light.png6.76KB3.76KB▼ 44.32%
assets/images/logo-icon-primary.png44.32KB12.00KB▼ 72.94%
assets/images/payflexi-wc.png7.35KB3.01KB▼ 59.12%
assets/images/logo-dark@2x.png24.30KB7.07KB▼ 70.89%