83% ni-one-page-inventory-management-system-for-woocommerce

Code Review | Ni One Page Inventory Management System For WooCommerce

WordPress plugin Ni One Page Inventory Management System For WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: ni-one-page-inven...
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 5.8.1
  • First release: Apr 4, 2020
  • Latest release: Sep 6, 2021
  • Number of updates: 12
  • Update frequency: every 43.3 days
  • Top authors: anzia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 720 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼141.33ms] Passed 4 tests

This is a short check of server-side resources used by Ni One Page Inventory Management System For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.2636.57 ▲13.96
Dashboard /wp-admin3.22 ▲0.1644.14 ▼0.06
Posts /wp-admin/edit.php3.33 ▲0.2243.73 ▼0.70
Add New Post /wp-admin/post-new.php5.57 ▲0.1488.21 ▼561.91
Media Library /wp-admin/upload.php3.16 ▲0.1633.17 ▼2.63
Settings /wp-admin/admin.php?page=niwopims-settings3.1629.96
Product List /wp-admin/admin.php?page=niwopims-stock-list3.2434.21
Location /wp-admin/admin.php?page=niwopims-location3.2029.96
Stock Center /wp-admin/admin.php?page=niwopims-stock-center3.2334.72
Dashboard /wp-admin/admin.php?page=niwopims-dashboard3.4227.76

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 44 new files
Database: 3 new tables, 1 new option
New tables
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ni One Page Inventory Management System For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,718 ▲12216.33 ▲0.628.80 ▼0.9749.00 ▼5.77
Dashboard /wp-admin3,012 ▲785.94 ▼0.03139.50 ▼4.20107.76 ▼3.84
Posts /wp-admin/edit.php2,778 ▲392.71 ▼0.0166.95 ▲4.3086.49 ▼6.27
Add New Post /wp-admin/post-new.php1,701 ▲8618.85 ▼2.52356.10 ▲72.16105.76 ▼0.93
Media Library /wp-admin/upload.php1,846 ▲395.07 ▲0.03142.50 ▲1.55120.97 ▼0.52
Settings /wp-admin/admin.php?page=niwopims-settings1,2032.5963.7894.92
Product List /wp-admin/admin.php?page=niwopims-stock-list2,1243.5996.1798.57
Location /wp-admin/admin.php?page=niwopims-location1,4492.6471.6484.27
Stock Center /wp-admin/admin.php?page=niwopims-stock-center1,3382.9369.9889.20
Dashboard /wp-admin/admin.php?page=niwopims-dashboard1,9672.4040.85102.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • recovery_mode_email_last_sent

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=niwopims-dashboard
    • > Error in wp-content/plugins/ni-one-page-inventory-management-system-for-woocommerce/includes/niwopims-dashboard.php+270
    Uncaught Error: Call to undefined function wc_price() in wp-content/plugins/ni-one-page-inventory-management-system-for-woocommerce/includes/niwopims-dashboard.php:270
    Stack trace:
    #0 wp-content/plugins/ni-one-page-inventory-management-system-for-woocommerce/includes/niwopims-core.php(213): NIWOPIMS_Dashboard->page_init()
    #1 wp-includes/class-wp-hook.php(303): NIWOPIMS_Core->add_page()
    #2 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(470): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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


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
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Dashboard show stock analysis summary), #2 (Product list, option to add stock, view purchase history and edit product), #3 (Add new purchase order.), #4 (View purchase product history, filter by date range.), #5 (Edit product.), #6 (Change number of record display on per page.), #7 (Stock center), #8 (Manage location), #9 (Setting page)
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

ni-one-page-inventory-management-system-for-woocommerce/ni-one-page-inventory-management-system-for-woocommerce.php 92% from 13 tests

The primary PHP file in "Ni One Page Inventory Management System For WooCommerce" version 1.0.9 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin8,295 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity25.25
▷ Minimum class complexity3.00
▷ Maximum class complexity54.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
▷ Static methods10.99%
▷ Public methods101100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.40MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png16.31KB5.32KB▼ 67.37%
screenshot-7.png30.77KB17.93KB▼ 41.72%
screenshot-4.png83.45KB34.70KB▼ 58.42%
screenshot-6.png3.25KB1.90KB▼ 41.67%
screenshot-5.png80.53KB33.22KB▼ 58.75%