67% dokan-lite

Code Review | Dokan - Best WooCommerce Multivendor Marketplace Solution - Build Your Own Amazon, eBay, Etsy

WordPress plugin Dokan - Best WooCommerce Multivendor Marketplace Solution - Build Your Own Amazon, eBay, Etsy scored67%from 54 tests.

About plugin

  • Plugin page: dokan-lite
  • Plugin version: 3.9.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 24, 2015
  • Latest release: Nov 30, 2023
  • Number of updates: 269
  • Update frequency: every 12.0 days
  • Top authors: tareq1988 (50.19%)sabbir1991 (50.19%)

Code review

54 tests

User reviews

670 reviews

Install metrics

60,000+ active /2,869,366 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.16MB] [CPU: ▼2.26ms] Passed 4 tests

An overview of server-side resources used by Dokan - Best WooCommerce Multivendor Marketplace Solution - Build Your Own Amazon, eBay, Etsy
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6338.72 ▼0.95
Dashboard /wp-admin4.70 ▲1.3656.09 ▼16.06
Posts /wp-admin/edit.php4.76 ▲1.4058.90 ▲9.99
Add New Post /wp-admin/post-new.php7.22 ▲1.33100.40 ▼2.03
Media Library /wp-admin/upload.php4.56 ▲1.3350.25 ▲16.98
/wp-admin/admin.php?page=dokan-setup4.4834.43

Server storage [IO: ▲14.16MB] [DB: ▲0.08MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • You have illegally modified 1 file (0.00KB) outside of "wp-content/plugins/dokan-lite/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/dokan-lite/assets/images/premium/C\303\251dric-Lefrancq.jpeg"
Filesystem: 667 new files
Database: 6 new tables, 11 new options
New tables
wp_dokan_reverse_withdrawal
wp_dokan_refund
wp_dokan_vendor_balance
wp_dokan_orders
wp_dokan_announcement
wp_dokan_withdraw
New WordPress options
dokan_pages_created
widget_recent-comments
widget_recent-posts
dokan_theme_version
db_upgraded
dokan_pages
theysaidso_admin_options
dokan_installed_time
can_compress_scripts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

A check of browser resources used by Dokan - Best WooCommerce Multivendor Marketplace Solution - Build Your Own Amazon, eBay, Etsy
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲10714.11 ▼0.521.70 ▲0.1039.72 ▼4.94
Dashboard /wp-admin2,271 ▲945.67 ▲0.0695.92 ▼0.6648.18 ▲2.20
Posts /wp-admin/edit.php2,183 ▲832.10 ▲0.1539.65 ▲1.6039.71 ▲4.58
Add New Post /wp-admin/post-new.php1,587 ▲4323.29 ▼1.93602.97 ▼52.3047.06 ▼24.05
Media Library /wp-admin/upload.php1,479 ▲824.21 ▼0.0096.40 ▼0.7744.69 ▲3.18
/wp-admin/admin.php?page=dokan-setup1961.8425.5729.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 tables in the database
    • wp_dokan_announcement
    • wp_dokan_withdraw
    • wp_dokan_reverse_withdrawal
    • wp_dokan_vendor_balance
    • wp_dokan_orders
    • wp_dokan_refund
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • dokan_installed_time
    • dokan_theme_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • dokan_pages_created
    • db_upgraded
    • dokan_pages
    • woocommerce_enable_myaccount_registration
    • ...

Smoke tests 50% 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 0% 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 take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/dokan-lite/templates/widgets/store-open-close.php
    • > /wp-content/plugins/dokan-lite/templates/settings/store-time.php
  • 254× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/dokan-lite/includes/Emails/VendorCompletedOrder.php:18
    • > PHP Notice
      Undefined variable: chosen_cat in wp-content/plugins/dokan-lite/templates/products/dokan-category-header-ui.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WeDevs\\Dokan\\Abstracts\\DokanUpgrader' not found in wp-content/plugins/dokan-lite/includes/Upgrade/Upgrades/V_2_9_23.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dokan-lite/templates/admin-setup-wizard/step-store.php:1
    • > PHP Fatal error
      Trait 'WeDevs\\Dokan\\Traits\\ObjectCache' not found in wp-content/plugins/dokan-lite/includes/Abstracts/DokanCache.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/dokan-lite/templates/global/dokan-warning.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Background_Process' not found in wp-content/plugins/dokan-lite/includes/Abstracts/DokanBackgroundProcesses.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/dokan-lite/templates/products/downloadable.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WeDevs\\Dokan\\Walkers\\CategoryDropdownSingle' not found in wp-content/plugins/dokan-lite/lib/class.category-walker.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dokan-lite/includes/functions-compatibility.php:230

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
The official readme.txt is a good inspiration

dokan-lite/dokan.php 85% from 13 tests

Analyzing the main PHP file in "Dokan - Best WooCommerce Multivendor Marketplace Solution - Build Your Own Amazon, eBay, Etsy" version 3.9.3
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dokan-lite.php" instead of "dokan.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.6" instead of "5.0.0")

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 plugin84,139 lines of code in 541 files:
LanguageFilesBlank linesComment linesLines of code
PHP42410,18919,93952,586
CSS2537426016,993
SVG45039,748
JavaScript367815733,561
Markdown45320925
JSON300167
XML2611116
YAML28043

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity15.85
▷ Minimum class complexity1.00
▷ Maximum class complexity192.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces50
Interfaces0
Traits7
Classes267
▷ Abstract classes145.24%
▷ Concrete classes25394.76%
▷ Final classes10.40%
Methods1,740
▷ Static methods20611.84%
▷ Public methods1,54388.68%
▷ Protected methods1035.92%
▷ Private methods945.40%
Functions320
▷ Named functions29592.19%
▷ Anonymous functions257.81%
Constants21
▷ Global constants21100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
88 PNG files occupy 0.84MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/weforms-logo.png29.65KB15.48KB▼ 47.80%
assets/images/modules/auction.png4.63KB4.75KB0.00%
assets/images/promotions/Get-priority-support-24_7_365_Newsletter.png35.25KB38.77KB0.00%
assets/vendors/jquery-ui/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/promo-logo.png11.00KB4.00KB▼ 63.61%