83% payment-gateway-via-valitor-for-woocommerce

Code Review | Payment Gateway via Valitor for WooCommerce

WordPress plugin Payment Gateway via Valitor for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: payment-gateway-v...
  • Plugin version: 1.9.35
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2016
  • Latest release: Nov 27, 2023
  • Number of updates: 64
  • Update frequency: every 39.6 days
  • Top authors: tacticaisdev (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /8,717 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.81ms] Passed 4 tests

This is a short check of server-side resources used by Payment Gateway via Valitor for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.22 ▼4.28
Dashboard /wp-admin3.33 ▼0.0248.74 ▼18.51
Posts /wp-admin/edit.php3.38 ▲0.0249.29 ▲1.76
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.56 ▼20.00
Media Library /wp-admin/upload.php3.25 ▲0.0134.89 ▼0.44

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Payment Gateway via Valitor for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.18 ▼0.541.77 ▲0.0843.35 ▼3.95
Dashboard /wp-admin2,198 ▲185.58 ▼0.0789.69 ▼7.5439.78 ▲0.31
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0038.90 ▼0.6834.45 ▼2.39
Add New Post /wp-admin/post-new.php1,535 ▲825.27 ▲2.19641.62 ▲1.5570.72 ▲9.79
Media Library /wp-admin/upload.php1,403 ▼04.23 ▼0.0695.58 ▼0.1245.51 ▲3.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/payment-gateway-via-valitor-for-woocommerce/valitor.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/payment-gateway-via-valitor-for-woocommerce/includes/class-wc-gateway-valitor.php:3
    • > PHP Warning
      The use statement with non-compound name 'Exception' has no effect in wp-content/plugins/payment-gateway-via-valitor-for-woocommerce/includes/class-payment-method-valitor-registration.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: valitor, gateway, credit card, woocommerce

payment-gateway-via-valitor-for-woocommerce/valitor.php 77% from 13 tests

The entry point to "Payment Gateway via Valitor for WooCommerce" version 1.9.35 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payment-gateway-via-valitor-for-woocommerce.php" instead of "valitor.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 143 characters long)

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
Everything looks great! No dangerous files found in this plugin924 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4100237719
PO File16877178
JavaScript261427

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity42.00
▷ Minimum class complexity6.00
▷ Maximum class complexity78.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods30
▷ Static methods13.33%
▷ Public methods1860.00%
▷ Protected methods1136.67%
▷ Private methods13.33%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
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
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
cards.png5.49KB2.76KB▼ 49.80%