84% vivawallet-woocommerce-gateway

Code Review | Viva Wallet Smart Checkout for your WooCommerce store

WordPress plugin Viva Wallet Smart Checkout for your WooCommerce store scored84%from 54 tests.

About plugin

  • Plugin page: vivawallet-woocom...
  • Plugin version: 3.6.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.0
  • WordPress version: 6.3.1
  • First release: Apr 23, 2020
  • Latest release: Jan 24, 2023
  • Number of updates: 76
  • Update frequency: every 13.3 days
  • Top authors: mgourd (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

5,000+ active /31,141 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Viva Wallet Smart Checkout for your WooCommerce store
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.03 ▼2.95
Dashboard /wp-admin3.31 ▼0.0449.74 ▼9.83
Posts /wp-admin/edit.php3.36 ▲0.0050.18 ▼4.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.30 ▼0.37
Media Library /wp-admin/upload.php3.23 ▲0.0033.59 ▼3.35

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Viva Wallet Smart Checkout for your WooCommerce store
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.15 ▼1.231.90 ▲0.0639.92 ▼1.41
Dashboard /wp-admin2,206 ▲185.81 ▲0.93101.13 ▼13.5841.07 ▲2.86
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0239.29 ▼1.2436.48 ▼0.95
Add New Post /wp-admin/post-new.php1,542 ▲2818.36 ▲0.77614.75 ▼71.0054.64 ▼3.09
Media Library /wp-admin/upload.php1,388 ▲64.24 ▲0.0697.05 ▼1.1845.36 ▲3.11

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-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vivawallet-woocommerce-gateway/wc-vivawallet.php:23

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 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: payment gateway, payment request, smart checkout, payments, credit card...

vivawallet-woocommerce-gateway/wc-vivawallet.php 85% from 13 tests

Analyzing the main PHP file in "Viva Wallet Smart Checkout for your WooCommerce store" version 3.6.8
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("vivawallet-woocommerce-gateway.php" instead of "wc-vivawallet.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin958 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP17562588
PO File4124248370

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity78.00
▷ Minimum class complexity78.00
▷ Maximum class complexity78.00
Average method complexity8.70
▷ Minimum method complexity1.00
▷ Maximum method complexity34.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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cards-wallets-transfers-more.png1.45KB1.07KB▼ 25.74%
vivawallet.png2.32KB1.67KB▼ 27.99%