89% qvo-payment-gateway

Code Review | Woocommerce QVO Payment Gateway Plugin

WordPress plugin Woocommerce QVO Payment Gateway Plugin scored89%from 54 tests.

About plugin

  • Plugin page: qvo-payment-gateway
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.1
  • WordPress version: 6.3.1
  • First release: Aug 2, 2017
  • Latest release: Oct 19, 2018
  • Number of updates: 19
  • Update frequency: every 23.3 days
  • Top authors: qvodev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,627 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by Woocommerce QVO Payment Gateway Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.63 ▲2.02
Dashboard /wp-admin3.31 ▲0.0048.04 ▼0.15
Posts /wp-admin/edit.php3.36 ▲0.0050.00 ▲0.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.78 ▼18.27
Media Library /wp-admin/upload.php3.23 ▲0.0036.26 ▼3.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce QVO Payment Gateway Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.67 ▼0.711.83 ▼0.2243.38 ▲3.04
Dashboard /wp-admin2,209 ▲185.80 ▲0.90102.43 ▼9.7142.97 ▲1.03
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0435.57 ▼4.6437.36 ▲0.41
Add New Post /wp-admin/post-new.php1,528 ▲1422.99 ▲5.44620.50 ▼87.0056.31 ▼14.48
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0294.55 ▼17.2743.26 ▼3.86

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

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)
No browser errors were detected

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
8 plugin tags: payment, redcompra, transbank, pago, chile...

qvo-payment-gateway/qvo_payment_gateway.php 85% from 13 tests

The main PHP file in "Woocommerce QVO Payment Gateway Plugin" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("qvo-payment-gateway.php" instead of "qvo_payment_gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected262 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36245231
Markdown221031

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.29
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/Logo_Webpay3-01-50x50.png3.83KB2.37KB▼ 38.09%