83% veplatform

Code Review | Ve for WooCommerce

WordPress plugin Ve for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: veplatform
  • Plugin version: 17.1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8.1
  • WordPress version: 5.9.2
  • First release: Aug 7, 2015
  • Latest release: Nov 16, 2017
  • Number of updates: 58
  • Update frequency: every 14.4 days
  • Top authors: alex.ivan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,616 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼293.87ms] Passed 4 tests

Server-side resources used by Ve for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0155.97 ▲4.07
Dashboard /wp-admin3.41 ▲0.0032.23 ▼4.28
Posts /wp-admin/edit.php3.64 ▲0.0038.63 ▲2.26
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.91 ▼1,172.05
Media Library /wp-admin/upload.php3.29 ▲0.0024.30 ▼1.42

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 235 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Ve for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲6115.91 ▲0.247.86 ▲2.293.01 ▲0.31
Dashboard /wp-admin2,892 ▲316.15 ▲0.02117.83 ▼32.72153.13 ▼16.37
Posts /wp-admin/edit.php2,694 ▲63.24 ▲0.0065.15 ▲3.15139.28 ▼6.93
Add New Post /wp-admin/post-new.php1,711 ▼6220.85 ▼1.18445.97 ▲2.56151.17 ▼9.60
Media Library /wp-admin/upload.php1,701 ▼05.51 ▼0.01149.81 ▲5.12189.96 ▲8.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/veplatform/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php+67
    count(): Parameter must be an array or an object that implements Countable

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Please fix the following items
  • 107× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant _VEPLATFORM_PLUGIN_DIR_ - assumed '_VEPLATFORM_PLUGIN_DIR_' (this will throw an Error in a future version of PHP) in wp-content/plugins/veplatform/classes/class-internal-woo-service.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/veplatform/vendor/guzzlehttp/psr7/src/FnStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/veplatform/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/veplatform/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/veplatform/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/veplatform/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/veplatform/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'VeLoggerInterface' not found in wp-content/plugins/veplatform/classes/class-ve-logger.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/veplatform/vendor/microsoft/application-insights/ApplicationInsights/Tests/Channel/Telemetry_Channel_Test.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/veplatform/vendor/guzzlehttp/psr7/src/DroppingStream.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: Add an image for screenshot #1 (Screenshot 1)
You can look at the official readme.txt

veplatform/Ve.php 92% from 13 tests

Analyzing the main PHP file in "Ve for WooCommerce" version 17.1.3.0
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("veplatform.php" instead of "Ve.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin20,362 lines of code in 203 files:
LanguageFilesBlank linesComment linesLines of code
PHP1723,0166,31816,271
Markdown1184903,039
JSON700444
JavaScript23915274
XML402127
PO File1201177
YAML317063
CSS15036
make211031

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.09
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces18
Interfaces18
Traits2
Classes139
▷ Abstract classes21.44%
▷ Concrete classes13798.56%
▷ Final classes42.92%
Methods1,503
▷ Static methods744.92%
▷ Public methods1,37091.15%
▷ Protected methods171.13%
▷ Private methods1167.72%
Functions390
▷ Named functions8421.54%
▷ Anonymous functions30678.46%
Constants48
▷ Global constants714.58%
▷ Class constants4185.42%
▷ Public constants41100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png2.25KB1.20KB▼ 46.78%
assets/img/woocommerce_logo.png7.18KB3.68KB▼ 48.75%