78% simple-multi-inventory-for-woocommerce

Code Review | Simple Multi-Inventory For Woocommerce

WordPress plugin Simple Multi-Inventory For Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: simple-multi-inve...
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 17, 2022
  • Latest release: Jan 10, 2023
  • Number of updates: 11
  • Update frequency: every 10.5 days
  • Top authors: yourwcninja (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /1,935 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.23MB] [CPU: ▼7.49ms] Passed 4 tests

An overview of server-side resources used by Simple Multi-Inventory For Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2642.90 ▼8.58
Dashboard /wp-admin3.54 ▲0.1950.28 ▼17.20
Posts /wp-admin/edit.php3.65 ▲0.2954.15 ▲0.17
Add New Post /wp-admin/post-new.php6.14 ▲0.2596.16 ▼4.33
Media Library /wp-admin/upload.php3.46 ▲0.2337.62 ▲2.05

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Multi-Inventory For Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲18413.55 ▼0.7210.28 ▲8.3442.51 ▼4.14
Dashboard /wp-admin2,206 ▲325.57 ▼0.1192.36 ▼6.0238.90 ▼3.63
Posts /wp-admin/edit.php2,120 ▲202.04 ▲0.0542.62 ▲3.6638.24 ▲2.15
Add New Post /wp-admin/post-new.php1,538 ▲723.11 ▼0.06656.70 ▲0.1657.03 ▲8.22
Media Library /wp-admin/upload.php1,417 ▲144.19 ▼0.05103.68 ▼9.5542.64 ▼1.74

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-multi-inventory-for-woocommerce/admin/partials/smifw-admin-display.php
    • > /wp-content/plugins/simple-multi-inventory-for-woocommerce/public/partials/smifw-public-display.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-multi-inventory-for-woocommerce/admin/partials/woocommerce-is-not-active.php:3
    • > PHP Notice
      Undefined variable: locations in wp-content/plugins/simple-multi-inventory-for-woocommerce/admin/partials/admin-location-stock-edit.php on line 1

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: multi locations, woocommerce multi warehouse, multi stock, stock locations, stock management...

simple-multi-inventory-for-woocommerce/smifw.php 92% from 13 tests

This is the main PHP file of "Simple Multi-Inventory For Woocommerce" version 2.0.0, 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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-multi-inventory-for-woocommerce.php" instead of "smifw.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
No dangerous file extensions were detected876 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14206577761
JavaScript21655111
CSS2184

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity20.14
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods52
▷ Static methods35.77%
▷ Public methods4586.54%
▷ Protected methods00.00%
▷ Private methods713.46%
Functions8
▷ Named functions337.50%
▷ Anonymous functions562.50%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin