90% payment-inlire-gateway

Code Review | Payment in-Lire Gateway

WordPress plugin Payment in-Lire Gateway scored90%from 54 tests.

About plugin

  • Plugin page: payment-inlire-ga...
  • Plugin version: 0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-9.0.1
  • WordPress version: 6.3.1
  • First release: Jul 18, 2019
  • Latest release: Oct 27, 2022
  • Number of updates: 4
  • Update frequency: every 303.0 days
  • Top authors: evtelwp (75%)andreimat (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /505 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.83ms] Passed 4 tests

A check of server-side resources used by Payment in-Lire Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.25 ▲2.58
Dashboard /wp-admin3.33 ▲0.0247.59 ▼0.30
Posts /wp-admin/edit.php3.38 ▲0.0249.46 ▲2.88
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.80 ▼15.30
Media Library /wp-admin/upload.php3.25 ▲0.0234.80 ▼2.29

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Payment in-Lire Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.18 ▼1.571.78 ▼0.0246.78 ▲6.96
Dashboard /wp-admin2,211 ▲235.80 ▼0.0797.44 ▼4.7441.00 ▼2.60
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0634.98 ▼1.5734.47 ▲0.78
Add New Post /wp-admin/post-new.php1,547 ▲3323.32 ▲5.71589.39 ▼100.3955.22 ▲1.55
Media Library /wp-admin/upload.php1,396 ▲84.33 ▲0.1394.77 ▼17.4740.12 ▼9.52

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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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

readme.txt 94% 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
These attributes need to be fixed:
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

payment-inlire-gateway/payment-inlire-gateway.php Passed 13 tests

The primary PHP file in "Payment in-Lire Gateway" version 0.1 is used by WordPress to initiate all plugin functionality
53 characters long description:
Extension for WooCommerce to add payment with in-Lire

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin573 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9146401573

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.86
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods43
▷ Static methods613.95%
▷ Public methods3990.70%
▷ Protected methods12.33%
▷ Private methods36.98%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.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/images/inlire.png5.65KB2.95KB▼ 47.84%