77% woo-vendor-module-add-ons-woocommerce

Code Review | Woo vendor module

WordPress plugin Woo vendor module scored77%from 54 tests.

About plugin

  • Plugin page: woo-vendor-module...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 18, 2015
  • Latest release: Sep 23, 2015
  • Number of updates: 23
  • Update frequency: every 8.2 days
  • Top authors: shankaranand12 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,974 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: ▼5.02ms] Passed 4 tests

Analyzing server-side resources used by Woo vendor module
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.17 ▼3.57
Dashboard /wp-admin3.31 ▲0.0051.59 ▼6.10
Posts /wp-admin/edit.php3.36 ▲0.0048.15 ▼1.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.91 ▼9.23
Media Library /wp-admin/upload.php3.23 ▲0.0038.03 ▲1.65

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Woo vendor module
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.36 ▲0.001.76 ▼0.4644.00 ▲3.42
Dashboard /wp-admin2,198 ▲215.66 ▼0.0091.76 ▼0.4038.92 ▼4.63
Posts /wp-admin/edit.php2,097 ▼61.98 ▼0.0235.13 ▲0.0232.14 ▼2.88
Add New Post /wp-admin/post-new.php1,526 ▼023.19 ▼0.00697.81 ▲47.1269.57 ▲19.11
Media Library /wp-admin/upload.php1,397 ▼34.30 ▲0.0998.44 ▼8.7043.40 ▼0.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-vendor-module-add-ons-woocommerce/woo-vendor-module.php
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      include_once(WOO_VENDOR__PLUGIN_DIRpages/myaccount/wv-myaccount.php): failed to open stream: No such file or directory in wp-content/plugins/woo-vendor-module-add-ons-woocommerce/pages/wv-pages.php on line 10
    • > PHP Warning
      include_once(): Failed opening 'WOO_VENDOR__PLUGIN_DIRpages/myaccount/wv-vendorlinks-in-myaccount.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/woo-vendor-module-add-ons-woocommerce/pages/myaccount/wv-myaccount.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'wvm_core_wvfunctions' not found in wp-content/plugins/woo-vendor-module-add-ons-woocommerce/init/admin/wv-woo-vendor-tab-pages.php:6
    • > PHP Warning
      Use of undefined constant WOO_VENDOR__PLUGIN_DIR - assumed 'WOO_VENDOR__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-vendor-module-add-ons-woocommerce/pages/wv-pages.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/woo-vendor-module-add-ons-woocommerce/init/wv-init.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'wvm_core_wvfunctions' not found in wp-content/plugins/woo-vendor-module-add-ons-woocommerce/init/wv-create-userRoles-capabilities.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-vendor-module-add-ons-woocommerce/init/admin/wv-woo-vendors.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-vendor-module-add-ons-woocommerce/init/admin/wv-extra_column_postType_product.php:6
    • > PHP Warning
      include_once(WOO_VENDOR__PLUGIN_DIRpages/myaccount/wv-vendorlinks-in-myaccount.php): failed to open stream: No such file or directory in wp-content/plugins/woo-vendor-module-add-ons-woocommerce/pages/myaccount/wv-myaccount.php on line 6
    • > PHP Warning
      include_once(WOO_VENDOR__PLUGIN_DIRpages/checkout/wv-thankyou.php): failed to open stream: No such file or directory in wp-content/plugins/woo-vendor-module-add-ons-woocommerce/pages/wv-pages.php on line 20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can look at the official readme.txt

woo-vendor-module-add-ons-woocommerce/woo-vendor-module.php 77% from 13 tests

Analyzing the main PHP file in "Woo vendor module" version 1.2
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-vendor-module-add-ons-woocommerce.php" instead of "woo-vendor-module.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 296 characters long)

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
No dangerous file extensions were detected2,496 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP163265131,346
CSS335681,146
JavaScript1364

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity15.80
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods55
▷ Static methods35.45%
▷ Public methods55100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.72MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-shop.png88.07KB28.46KB▼ 67.68%
screenshot2.png82.87KB30.81KB▼ 62.82%
screenshot5.png52.07KB19.58KB▼ 62.39%
screenshot1.png81.65KB29.88KB▼ 63.41%
screenshot4.png139.31KB52.80KB▼ 62.10%