89% payflexi-instalment-payment-gateway-for-easy-digital-downloads

Code Review | PayFlexi Instalment Payment Gateway for Easy Digital Downloads

WordPress plugin PayFlexi Instalment Payment Gateway for Easy Digital Downloads scored89%from 54 tests.

About plugin

  • Plugin page: payflexi-instalme...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Mar 17, 2021
  • Latest release: Jul 17, 2022
  • Number of updates: 4
  • Update frequency: every 122.0 days
  • Top authors: payflexi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /594 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼10.30ms] Passed 4 tests

An overview of server-side resources used by PayFlexi Instalment Payment Gateway for Easy Digital Downloads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.42 ▼1.83
Dashboard /wp-admin3.40 ▲0.0548.80 ▼45.63
Posts /wp-admin/edit.php3.51 ▲0.1551.64 ▲2.93
Add New Post /wp-admin/post-new.php5.98 ▲0.0994.85 ▲3.90
Media Library /wp-admin/upload.php3.32 ▲0.0939.01 ▲3.32

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 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 Instalment Payment Gateway for Easy Digital Downloads
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.34 ▼1.271.62 ▼0.4142.49 ▲0.01
Dashboard /wp-admin2,206 ▲214.87 ▼1.01111.81 ▲9.1344.61 ▲2.38
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0841.23 ▼0.7735.46 ▲0.73
Add New Post /wp-admin/post-new.php1,533 ▼923.27 ▲5.15670.83 ▲53.3658.98 ▲6.49
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.0595.06 ▼11.9345.93 ▲4.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: online payments, paystack, edd, installment, flutterwave...

payflexi-instalment-payment-gateway-for-easy-digital-downloads/edd-payflexi.php 85% from 13 tests

"PayFlexi Instalment Payment Gateway for Easy Digital Downloads" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 197 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("payflexi-instalment-payment-gateway-for-easy-digital-downloads.php" instead of "edd-payflexi.php")

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
Success! There were no dangerous files found in this plugin464 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1143124464

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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-primary.png44.32KB12.00KB▼ 72.94%
assets/images/logo-icon-white.png35.93KB12.00KB▼ 66.61%
assets/images/payflexi-logo-light.png6.76KB3.76KB▼ 44.32%
assets/images/logo-dark@2x.png24.30KB7.07KB▼ 70.89%
assets/images/payflexi-wc.png7.35KB3.01KB▼ 59.12%