90% vandar-woocommerce-gateway

Code Review | Vandar.io Woocommerce Gateway

WordPress plugin Vandar.io Woocommerce Gateway scored90%from 54 tests.

About plugin

  • Plugin page: vandar-woocommerc...
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.0
  • WordPress version: 6.3.1
  • First release: Mar 13, 2019
  • Latest release: Aug 10, 2023
  • Number of updates: 44
  • Update frequency: every 36.6 days
  • Top authors: vandarpay (95.45%)samooel (6.82%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,431 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.90ms] Passed 4 tests

Analyzing server-side resources used by Vandar.io Woocommerce Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0839.84 ▼3.97
Dashboard /wp-admin3.39 ▲0.0951.87 ▼4.68
Posts /wp-admin/edit.php3.44 ▲0.0852.72 ▼11.41
Add New Post /wp-admin/post-new.php5.97 ▲0.0894.16 ▼11.54
Media Library /wp-admin/upload.php3.31 ▲0.0837.14 ▲0.10

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Vandar.io Woocommerce Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.21 ▼0.142.22 ▲0.3744.86 ▼0.41
Dashboard /wp-admin2,192 ▲155.54 ▼0.0381.49 ▼23.5038.36 ▼4.59
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0140.52 ▼0.6035.12 ▼9.45
Add New Post /wp-admin/post-new.php1,526 ▼222.98 ▼0.15619.43 ▲0.5455.53 ▼2.30
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0197.01 ▼9.9148.55 ▲2.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: e-commerce, payment, vandario woocommerce, payment gateway, woocommerce payment...

vandar-woocommerce-gateway/index.php 92% from 13 tests

"Vandar.io Woocommerce Gateway" version 3.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("vandar-woocommerce-gateway.php" instead of "index.php")

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
No dangerous file extensions were detected418 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP210413372
SVG20025
Markdown19021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity7.22
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png30.27KB8.86KB▼ 70.74%
assets/icon-256x256.png6.28KB2.56KB▼ 59.17%
assets/banner-1544x500.png95.71KB22.72KB▼ 76.26%
assets/icon-128x128.png2.86KB1.31KB▼ 54.05%