72% dropshipping-woocommerce

Code Review | Knawat WooCommerce DropShipping

WordPress plugin Knawat WooCommerce DropShipping scored 72% from 54 tests.

About plugin

  • Plugin page: dropshipping-wooc...
  • Plugin version: 3.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-5.8.3
  • WordPress version: 5.9.2
  • First release: Feb 16, 2018
  • Latest release: Feb 24, 2022
  • Number of updates: 36
  • Update frequency: every 40.9 days
  • Top authors: Dharm1025 (36.11%)firstanonymous (30.56%)knawat (19.44%)esl4m (16.67%)dharmeshtatva (8.33%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active / 15,470 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.02MB] [CPU: ▼273.92ms] Passed 4 tests

A check of server-side resources used by Knawat WooCommerce DropShipping
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.41 ▲0.9064.71 ▲14.37
Dashboard /wp-admin4.62 ▲1.2151.58 ▲17.54
Posts /wp-admin/edit.php4.81 ▲1.1756.07 ▲17.32
Add New Post /wp-admin/post-new.php7.78 ▲0.82112.40 ▼1,144.50
Media Library /wp-admin/upload.php4.50 ▲1.2140.24 ▲17.13
Knawat Setup /wp-admin/admin.php?page=knawat_setup4.4331.12
Dropshipping /wp-admin/admin.php?page=knawat_dropship4.2336.12
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins4.5840.09

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 52 new files
Database: no new tables, 1 new option
New WordPress options
knawat_dropwc_version

Browser metrics Passed 4 tests

An overview of browser requirements for Knawat WooCommerce DropShipping
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /5,107 ▲1,35315.82 ▲0.176.69 ▲0.262.41 ▼0.31
Dashboard /wp-admin4,238 ▲1,3776.33 ▲0.18123.87 ▼11.37190.32 ▲28.64
Posts /wp-admin/edit.php4,044 ▲1,3503.32 ▲0.2769.64 ▲7.81157.20 ▲21.70
Add New Post /wp-admin/post-new.php2,979 ▲1,31815.32 ▼1.65379.23 ▼45.26185.28 ▲16.68
Media Library /wp-admin/upload.php3,055 ▲1,3575.67 ▲0.12127.60 ▼15.53220.60 ▲25.29
Knawat Setup /wp-admin/admin.php?page=knawat_setup1,7992.6145.7461.44
Dropshipping /wp-admin/admin.php?page=knawat_dropship2,7312.8455.92166.67
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins2,6732.7156.49128.49

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • knawat_dropwc_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=knawat_dropship
    • > Notice in wp-content/plugins/dropshipping-woocommerce/templates/admin/dropshipping-woocommerce-settings.php+226
    Undefined variable: products_count
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=knawat_dropship
    • > Notice in wp-content/plugins/dropshipping-woocommerce/templates/admin/dropshipping-woocommerce-settings.php+226
    Undefined variable: products_synced
    • > GET request to /wp-admin/admin.php?page=knawat_dropship
    • > Notice in wp-content/plugins/dropshipping-woocommerce/templates/admin/dropshipping-woocommerce-settings.php+226
    Undefined variable: stock_count

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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dropshipping-woocommerce/includes/lib/knawat-merlin/assets/images/spinner.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/dropshipping-woocommerce/includes/lib/tgmpa/class-tgm-plugin-activation.php:2129
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dropshipping-woocommerce/includes/knawat-required-plugins.php:116
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/dropshipping-woocommerce/includes/lib/wp-background-processing/wp-background-process.php:16

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: No descriptions were found for these screenshots #3, #4, #5, #6, #7, #8 in dropshipping-woocommerce/assets to your readme.txt
Please take inspiration from this readme.txt

dropshipping-woocommerce/dropshipping-woocommerce.php 92% from 13 tests

This is the main PHP file of "Knawat WooCommerce DropShipping" version 3.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin12,012 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP281,6773,9257,669
CSS3264192,275
PO File24525671,100
SVG1172629
JavaScript35914277
Markdown211022
JSON10020
XML26620

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity52.60
▷ Minimum class complexity1.00
▷ Maximum class complexity207.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity93.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes28.00%
▷ Concrete classes2392.00%
▷ Final classes00.00%
Methods342
▷ Static methods72.05%
▷ Public methods27680.70%
▷ Protected methods5816.96%
▷ Private methods82.34%
Functions30
▷ Named functions2686.67%
▷ Anonymous functions413.33%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
docs/multi-drop-shipper-digram.png33.66KB12.52KB▼ 62.80%
assets/images/knawat.png0.55KB0.70KB0.00%