84% simple-inventory

Code Review | Simple Inventory

WordPress plugin Simple Inventory scored 84% from 54 tests.

About plugin

  • Plugin page: simple-inventory
  • Plugin version: 0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5
  • WordPress version: 6.3.1
  • First release: Jun 26, 2014
  • Latest release: Dec 7, 2015
  • Number of updates: 7
  • Update frequency: every 77.7 days
  • Top authors: theode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.68ms] Passed 4 tests

Analyzing server-side resources used by Simple Inventory
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.30 ▼0.90
Dashboard /wp-admin3.36 ▲0.0644.69 ▼4.45
Posts /wp-admin/edit.php3.41 ▲0.0650.06 ▲0.26
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.93 ▼25.62
Media Library /wp-admin/upload.php3.28 ▲0.0636.67 ▲2.74
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=si_good3.2838.79
Add New /wp-admin/post-new.php?post_type=si_good3.3758.38
All Goods / Products /wp-admin/edit.php?post_type=si_good3.3437.85

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
category_children

Browser metrics Passed 4 tests

Simple Inventory: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9914.47 ▼0.091.67 ▼0.0539.49 ▼1.00
Dashboard /wp-admin2,240 ▲524.86 ▼0.0396.69 ▼16.1240.07 ▼7.26
Posts /wp-admin/edit.php2,120 ▲312.02 ▼0.0239.84 ▼1.6236.22 ▼1.69
Add New Post /wp-admin/post-new.php1,568 ▲4918.03 ▼5.31628.67 ▼8.0054.04 ▼1.49
Media Library /wp-admin/upload.php1,419 ▲314.19 ▼0.0498.46 ▼4.6243.00 ▼3.26
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=si_good1,4772.1426.9733.38
Add New /wp-admin/post-new.php?post_type=si_good1,8503.9461.6333.79
All Goods / Products /wp-admin/edit.php?post_type=si_good1,1761.9532.6232.27

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • category_children

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means 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 items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-inventory/simple-inventory.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: management, storage, inventory, goods, simple

simple-inventory/simple-inventory.php 92% from 13 tests

The entry point to "Simple Inventory" version 0.11 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0" instead of "3.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin174 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16546174

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected