84% wc-vpay

Code Review | VPay Payment Gateway for WooCommerce

WordPress plugin VPay Payment Gateway for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-vpay
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: May 23, 2023
  • Latest release: May 24, 2023
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: vpayafrica (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /123 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by VPay Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0140.25 ▲0.06
Dashboard /wp-admin3.36 ▼0.0351.65 ▼14.53
Posts /wp-admin/edit.php3.41 ▲0.0148.76 ▼0.23
Add New Post /wp-admin/post-new.php5.94 ▲0.0185.29 ▼23.11
Media Library /wp-admin/upload.php3.28 ▲0.0136.53 ▲0.89

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by VPay Payment Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.35 ▲0.061.97 ▲0.2243.02 ▲3.15
Dashboard /wp-admin2,202 ▲225.55 ▼0.0791.79 ▼1.1342.82 ▲1.95
Posts /wp-admin/edit.php2,110 ▲102.01 ▼0.0038.51 ▲2.7334.09 ▲1.70
Add New Post /wp-admin/post-new.php1,533 ▲523.68 ▲0.34664.50 ▼16.5263.05 ▲5.09
Media Library /wp-admin/upload.php1,407 ▲74.18 ▲0.0296.23 ▼8.7645.94 ▼3.69

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

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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 following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-vpay/includes/json-receive.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-vpay/includes/class-wc-vpay-gateway.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/wc-vpay/wc-vpay.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 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
9 plugin tags: nigeria, verve, vpay, naira, payment gateway...

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

The main PHP script in "VPay Payment Gateway for WooCommerce" version 1.1.0 is automatically included on every request by WordPress
75 characters long description:
Receive instant and fast payments via bank transfer, USSD and card payment.

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
Success! There were no dangerous files found in this plugin1,014 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP4186135420
CSS22012350
JavaScript41710192
SVG10052

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods15.88%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin