84% wc-liqpay

Code Review | Payment Gateway for LiqPay for Woocommerce

WordPress plugin Payment Gateway for LiqPay for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-liqpay
  • Plugin version: 1.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.2-6.1.0
  • WordPress version: 6.3.1
  • First release: Aug 18, 2022
  • Latest release: Sep 6, 2023
  • Number of updates: 11
  • Update frequency: every 36.5 days
  • Top authors: sergeyivanovj (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /1,714 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.75ms] Passed 4 tests

A check of server-side resources used by Payment Gateway for LiqPay for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0142.59 ▲0.70
Dashboard /wp-admin3.36 ▼0.0349.47 ▼15.39
Posts /wp-admin/edit.php3.41 ▲0.0148.44 ▼1.55
Add New Post /wp-admin/post-new.php5.94 ▲0.0185.09 ▼23.89
Media Library /wp-admin/upload.php3.28 ▲0.0136.32 ▼2.15

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Payment Gateway for LiqPay for Woocommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.25 ▲0.062.26 ▲0.6040.69 ▼4.32
Dashboard /wp-admin2,198 ▲245.61 ▲0.0786.05 ▼5.6642.44 ▲1.09
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0536.61 ▲0.5735.97 ▲0.54
Add New Post /wp-admin/post-new.php1,535 ▲917.91 ▼5.21632.17 ▼73.9564.16 ▲3.07
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0096.77 ▼15.1641.06 ▼8.66

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-liqpay/includes/WC_Gateway_kmnd_Liqpay.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
6 plugin tags: payment, wc, woocommerce, liqpay, woo...

wc-liqpay/wc-liqpay.php Passed 13 tests

The main file in "Payment Gateway for LiqPay for Woocommerce" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
107 characters long description:
Plugin for paying for products through the LiqPay service. Works in conjunction with the Woocommerce plugin

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
Success! There were no dangerous files found in this plugin656 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP415151428
PO File14044109
CSS14068
SVG10045
JavaScript1206

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity22.00
▷ Minimum class complexity13.00
▷ Maximum class complexity31.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1578.95%
▷ Protected methods00.00%
▷ Private methods421.05%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/LiqPay.png10.49KB3.55KB▼ 66.21%