83% z-inventory-manager

Code Review | PlainInventory - Inventory Management Plugin

WordPress plugin PlainInventory - Inventory Management Plugin scored 83% from 54 tests.

About plugin

  • Plugin page: z-inventory-manager
  • Plugin version: 3.1.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 8, 2016
  • Latest release: Jun 2, 2023
  • Number of updates: 61
  • Update frequency: every 39.8 days
  • Top authors: hitcode (52.46%)plainware (49.18%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 19,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
Install script ran successfully

Server metrics [RAM: ▲1.15MB] [CPU: ▲9.44ms] Passed 4 tests

An overview of server-side resources used by PlainInventory - Inventory Management Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.28 ▼1.26
Dashboard /wp-admin4.82 ▲1.5260.50 ▲11.92
Posts /wp-admin/edit.php4.93 ▲1.5857.03 ▲7.78
Add New Post /wp-admin/post-new.php7.40 ▲1.51111.34 ▲19.31
Media Library /wp-admin/upload.php4.74 ▲1.5154.35 ▲21.43

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 269 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for PlainInventory - Inventory Management Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲14213.30 ▼1.084.63 ▲2.9843.04 ▼6.03
Dashboard /wp-admin2,283 ▲924.88 ▼0.18112.63 ▲8.3250.75 ▲8.63
Posts /wp-admin/edit.php2,169 ▲832.06 ▲0.0438.30 ▼2.4343.43 ▲8.50
Add New Post /wp-admin/post-new.php1,574 ▲4522.38 ▲4.03575.44 ▼70.1953.57 ▲4.93
Media Library /wp-admin/upload.php1,465 ▲804.26 ▲0.0594.66 ▼10.5847.39 ▼0.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% 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 50% 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
  • 30× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class '_PW1' not found in wp-content/plugins/z-inventory-manager/zi3/acl-wp--html/acl-wp-reset/index.php:2
    • > PHP Fatal error
      Uncaught Error: Class '_PW1' not found in wp-content/plugins/z-inventory-manager/zi3/apps-z-inventory-manager/_.php:2
    • > PHP Fatal error
      Uncaught Error: Class '_PW1' not found in wp-content/plugins/z-inventory-manager/zi3/acl--html/widget/roles.php:2
    • > PHP Fatal error
      Uncaught Error: Class '_PW1' not found in wp-content/plugins/z-inventory-manager/zi3/acl-wp--html/admin-users-acl-wp-newrole/index.php:2
    • > PHP Fatal error
      Uncaught Error: Class '_PW1' not found in wp-content/plugins/z-inventory-manager/zi3/transactions-audit/command.php:2
    • > PHP Fatal error
      Uncaught Error: Class '_PW1' not found in wp-content/plugins/z-inventory-manager/pw1/core.php:2
    • > PHP Fatal error
      Uncaught Error: Class '_PW1' not found in wp-content/plugins/z-inventory-manager/zi3/audit--html/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class '_PW1' not found in wp-content/plugins/z-inventory-manager/pw1/q.php:137
    • > PHP Fatal error
      Uncaught Error: Class '_PW1' not found in wp-content/plugins/z-inventory-manager/pw1/session.php:2
    • > PHP Fatal error
      Uncaught Error: Class '_PW1' not found in wp-content/plugins/z-inventory-manager/zi3/items-stocks--html/widget.php:2

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

z-inventory-manager/z-inventory-manager3.php 85% from 13 tests

This is the main PHP file of "PlainInventory - Inventory Management Plugin" version 3.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("z-inventory-manager.php" instead of "z-inventory-manager3.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin20,648 lines of code in 263 files:
LanguageFilesBlank linesComment linesLines of code
PHP2574,3721,88619,005
PO File341111858
CSS3128106785

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.83
▷ Minimum class complexity1.00
▷ Maximum class complexity299.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces5
Traits0
Classes273
▷ Abstract classes00.00%
▷ Concrete classes273100.00%
▷ Final classes00.00%
Methods1,232
▷ Static methods413.33%
▷ Public methods1,15093.34%
▷ Protected methods614.95%
▷ Private methods211.70%
Functions15
▷ Named functions533.33%
▷ Anonymous functions1066.67%
Constants30
▷ Global constants26.67%
▷ Class constants2893.33%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin