89% woo-virtual-merchant

Code Review | WooCommerce Virtual Merchant

WordPress plugin WooCommerce Virtual Merchant scored89%from 54 tests.

About plugin

  • Plugin page: woo-virtual-merchant
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Jul 30, 2017
  • Latest release: Oct 27, 2021
  • Number of updates: 11
  • Update frequency: every 141.1 days
  • Top authors: vaibhav12321 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,259 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by WooCommerce Virtual Merchant
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.25 ▲2.27
Dashboard /wp-admin3.32 ▲0.0143.46 ▼4.16
Posts /wp-admin/edit.php3.43 ▲0.0745.76 ▼7.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.73 ▼28.35
Media Library /wp-admin/upload.php3.24 ▲0.0136.14 ▲0.46

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Virtual Merchant
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.68 ▲0.461.89 ▲0.1543.80 ▼1.22
Dashboard /wp-admin2,206 ▲154.83 ▼0.03109.08 ▲0.8339.06 ▼2.63
Posts /wp-admin/edit.php2,089 ▼02.14 ▲0.1642.27 ▲2.3035.20 ▼7.25
Add New Post /wp-admin/post-new.php1,533 ▼923.15 ▲4.87627.64 ▲10.3051.25 ▲1.65
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0396.13 ▼2.8342.03 ▼2.87

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
Looking good! No server-side errors or output 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
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

woo-virtual-merchant/woo-virtual-merchant.php 92% from 13 tests

The main PHP script in "WooCommerce Virtual Merchant" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.6" instead of "3.0")

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
There were no executable files found in this plugin376 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP38134376

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.33
▷ Minimum class complexity4.00
▷ Maximum class complexity27.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods310.71%
▷ Public methods2382.14%
▷ Protected methods517.86%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
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
images/hint.png8.82KB4.09KB▼ 53.65%