78% woocommerce-alter-inventory

Code Review | Alter Inventory - Woocommerce Plugin

WordPress plugin Alter Inventory - Woocommerce Plugin scored78%from 54 tests.

About plugin

  • Plugin page: woocommerce-alter...
  • Plugin version: 1.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-4.5
  • WordPress version: 6.3.1
  • First release: Feb 16, 2014
  • Latest release: Jun 14, 2016
  • Number of updates: 31
  • Update frequency: every 27.4 days
  • Top authors: Bigbabert (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /3,846 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.00MB] [CPU: ▼6.13ms] Passed 4 tests

A check of server-side resources used by Alter Inventory - Woocommerce Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.11 ▼9.64
Dashboard /wp-admin3.31 ▼0.0344.56 ▼13.16
Posts /wp-admin/edit.php3.36 ▲0.0044.25 ▼0.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.83 ▲5.11
Media Library /wp-admin/upload.php3.23 ▲0.0032.41 ▼1.65

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

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

Browser metrics Passed 4 tests

Alter Inventory - Woocommerce Plugin: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.27 ▼1.311.61 ▼0.0042.01 ▼3.02
Dashboard /wp-admin2,218 ▲295.87 ▲1.0097.61 ▼9.0139.63 ▼1.01
Posts /wp-admin/edit.php2,097 ▲52.01 ▲0.0339.59 ▲2.5435.01 ▲3.75
Add New Post /wp-admin/post-new.php1,551 ▲3218.23 ▼4.85608.00 ▼92.8859.57 ▲6.46
Media Library /wp-admin/upload.php1,400 ▲154.28 ▲0.10101.01 ▼5.4941.97 ▼2.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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/woocommerce-alter-inventory/public/partials/woocommerce-alter-inventory-public-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/woocommerce-alter-inventory/admin/partials/woocommerce-alter-inventory-custom-cart.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WC() in wp-content/plugins/woocommerce-alter-inventory/admin/partials/woocommerce-alter-inventory-shortcode-display.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (This is a screenshot of inventory page.), #2 (This is a screenshot of report page.)
You can look at the official readme.txt

woocommerce-alter-inventory/woocommerce-alter-inventory.php 92% from 13 tests

The entry point to "Alter Inventory - Woocommerce Plugin" version 1.2.8 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 435 characters long)

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
Everything looks great! No dangerous files found in this plugin1,191 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP13176668821
CSS3712280
JavaScript3195084
Markdown1406

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.14
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods40
▷ Static methods1127.50%
▷ Public methods3587.50%
▷ Protected methods00.00%
▷ Private methods512.50%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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