90% valitorpay-payment-gateway-for-woocommerce

Code Review | Payment Gateway via ValitorPay for WooCommerce

WordPress plugin Payment Gateway via ValitorPay for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: valitorpay-paymen...
  • Plugin version: 1.2.15
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 25, 2020
  • Latest release: Nov 10, 2023
  • Number of updates: 46
  • Update frequency: every 25.5 days
  • Top authors: tacticaisdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,630 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Payment Gateway via ValitorPay for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.02 ▲0.29
Dashboard /wp-admin3.33 ▼0.0146.12 ▼15.05
Posts /wp-admin/edit.php3.38 ▲0.0349.06 ▲1.29
Add New Post /wp-admin/post-new.php5.93 ▲0.0581.19 ▼6.43
Media Library /wp-admin/upload.php3.26 ▲0.0334.69 ▼0.64

Server storage [IO: ▲0.09MB] [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
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Payment Gateway via ValitorPay for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲6514.13 ▼0.581.80 ▲0.0844.34 ▲0.46
Dashboard /wp-admin2,209 ▲285.63 ▼0.0793.12 ▼8.1939.91 ▼2.83
Posts /wp-admin/edit.php2,114 ▲142.00 ▲0.0343.45 ▲4.5636.24 ▲3.81
Add New Post /wp-admin/post-new.php1,542 ▲1623.51 ▲0.16643.85 ▼63.8659.36 ▼2.03
Media Library /wp-admin/upload.php1,414 ▲174.20 ▲0.03100.11 ▼4.2041.94 ▼2.24

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

valitorpay-payment-gateway-for-woocommerce/valitorpay-payment-gateway-for-woocommerce.php Passed 13 tests

Analyzing the main PHP file in "Payment Gateway via ValitorPay for WooCommerce" version 1.2.15
45 characters long description:
Extends WooCommerce with a ValitorPay gateway

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,470 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92606411,425
CSS10026
JavaScript11019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity36.86
▷ Minimum class complexity5.00
▷ Maximum class complexity104.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods73
▷ Static methods34.11%
▷ Public methods6082.19%
▷ Protected methods912.33%
▷ Private methods45.48%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin