84% wc-qpay-gateway

Code Review | Gateway for Qpay on WooCommerce

WordPress plugin Gateway for Qpay on WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-qpay-gateway
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Apr 15, 2022
  • Latest release: May 11, 2022
  • Number of updates: 4
  • Update frequency: every 6.5 days
  • Top authors: biligunb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /660 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Gateway for Qpay on WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.06 ▼6.39
Dashboard /wp-admin3.31 ▲0.0146.10 ▼8.29
Posts /wp-admin/edit.php3.36 ▲0.0051.21 ▲0.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.70 ▼15.92
Media Library /wp-admin/upload.php3.23 ▲0.0036.57 ▼0.02

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 39 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

An overview of browser requirements for Gateway for Qpay on WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.25 ▼0.352.83 ▲1.0842.57 ▼2.34
Dashboard /wp-admin2,195 ▲185.61 ▲0.0789.80 ▼14.1138.86 ▼8.01
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0338.69 ▲2.7235.94 ▼4.02
Add New Post /wp-admin/post-new.php1,526 ▼223.03 ▼0.11652.31 ▼38.9846.86 ▼5.05
Media Library /wp-admin/upload.php1,397 ▼34.21 ▼0.0194.90 ▼22.9342.68 ▼6.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-qpay-gateway/admin/partials/qplugin-admin-display.php
    • > /wp-content/plugins/wc-qpay-gateway/public/partials/qplugin-public-display.php

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: qpay, gateway, qr code

wc-qpay-gateway/qplugin.php 85% from 13 tests

"Gateway for Qpay on WooCommerce" version 1.0.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:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-qpay-gateway.php" instead of "qplugin.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
No dangerous file extensions were detected842 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP14158630468
JavaScript5669185
Markdown3680151
CSS552229
SVG1009

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.88
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods2775.00%
▷ Protected methods411.11%
▷ Private methods513.89%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/icons/logo_100px.png2.95KB2.42KB▼ 17.79%
public/images/icons/logo.png22.19KB13.09KB▼ 41.01%