84% wc-victoriabank

Code Review | WooCommerce Victoriabank Payment Gateway

WordPress plugin WooCommerce Victoriabank Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: wc-victoriabank
  • Plugin version: 1.3.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 12, 2018
  • Latest release: Oct 19, 2023
  • Number of updates: 23
  • Update frequency: every 89.1 days
  • Top authors: alexminza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,632 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.27MB] [CPU: ▼6.30ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Victoriabank Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3043.09 ▲2.28
Dashboard /wp-admin3.62 ▲0.2854.99 ▼7.84
Posts /wp-admin/edit.php3.67 ▲0.3247.36 ▼0.34
Add New Post /wp-admin/post-new.php6.14 ▲0.2694.51 ▼14.76
Media Library /wp-admin/upload.php3.48 ▲0.2635.76 ▼2.26

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Victoriabank Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.31 ▼0.262.06 ▲0.4543.39 ▲2.06
Dashboard /wp-admin2,195 ▲265.47 ▼0.2481.21 ▼19.8138.74 ▼5.64
Posts /wp-admin/edit.php2,097 ▼01.99 ▼0.0333.69 ▲0.5335.33 ▼1.92
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▲0.02575.81 ▼130.0249.50 ▼14.71
Media Library /wp-admin/upload.php1,400 ▲64.26 ▲0.1195.92 ▼1.8439.76 ▼3.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

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
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
Almost there! Just fix the following items
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Fruitware\\VictoriaBankGateway\\VictoriaBank\\Request' not found in wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/src/VictoriaBank/Completion/CompletionRequest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Fruitware\\VictoriaBankGateway\\VictoriaBank\\Response' not found in wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/src/VictoriaBank/Completion/CompletionResponse.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Fruitware\\VictoriaBankGateway\\VictoriaBank\\Response' not found in wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/src/VictoriaBank/Reversal/ReversalResponse.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/Tests/VictoriaBankGatewayTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Fruitware\\VictoriaBankGateway\\VictoriaBank\\Response' not found in wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/src/VictoriaBank/Authorization/AuthorizationResponse.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Fruitware\\VictoriaBankGateway\\VictoriaBank\\Request' not found in wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/src/VictoriaBank/Reversal/ReversalRequest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Fruitware\\VictoriaBankGateway\\VictoriaBank\\Request' not found in wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/src/VictoriaBank/Authorization/AuthorizationRequest.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/Tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/Tests/bootstrap.php on line 3
    • > PHP Warning
      require_once(wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/Tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/Tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Fruitware\\VictoriaBankGateway\\VictoriaBank\\ResponseInterface' not found in wp-content/plugins/wc-victoriabank/vendor/fruitware/victoria-bank-gateway/src/VictoriaBank/Response.php:10

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: bank, gateway, credit card, vb, moldova...

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

The principal PHP file in "WooCommerce Victoriabank Payment Gateway" v. 1.3.8 is loaded by WordPress automatically on each request
104 characters long description:
Accept Visa and Mastercard directly on your store with the Victoriabank payment gateway for WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin3,908 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP265831,1032,737
PO File2194198531
XML1440325
JSON300154
Markdown1640138
YAML36121
SVG2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity18.11
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces8
Interfaces2
Traits0
Classes17
▷ Abstract classes211.76%
▷ Concrete classes1588.24%
▷ Final classes00.00%
Methods177
▷ Static methods4424.86%
▷ Public methods12067.80%
▷ Protected methods5430.51%
▷ Private methods31.69%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants92
▷ Global constants00.00%
▷ Class constants92100.00%
▷ Public constants92100.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/card-visa.png0.82KB0.85KB0.00%
assets/img/victoriabank.png6.49KB3.46KB▼ 46.64%
assets/img/paymentsystems.png5.16KB2.90KB▼ 43.86%
assets/img/card-mastercard.png3.87KB2.16KB▼ 44.22%