84% out-of-stock-display-manager-for-woocommerce

Code Review | Out of Stock Display Manager for WooCommerce

WordPress plugin Out of Stock Display Manager for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: out-of-stock-disp...
  • Plugin version: 2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 26, 2021
  • Latest release: Jan 2, 2023
  • Number of updates: 5
  • Update frequency: every 86.6 days
  • Top authors: charliemac24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /321 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.91ms] Passed 4 tests

Analyzing server-side resources used by Out of Stock Display Manager for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.31 ▼0.43
Dashboard /wp-admin3.31 ▲0.0145.74 ▼2.95
Posts /wp-admin/edit.php3.36 ▲0.0046.56 ▼1.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.53 ▼2.98
Media Library /wp-admin/upload.php3.23 ▲0.0036.21 ▲4.06

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Out of Stock Display Manager for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.23 ▼1.441.69 ▼0.1239.91 ▼1.25
Dashboard /wp-admin2,222 ▲375.81 ▲0.9596.99 ▼4.9438.96 ▼4.23
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0740.07 ▲1.4736.66 ▲1.73
Add New Post /wp-admin/post-new.php1,555 ▲3618.24 ▼5.10626.01 ▼61.1657.51 ▼19.81
Media Library /wp-admin/upload.php1,407 ▲164.33 ▲0.0697.86 ▼1.5240.06 ▼4.97

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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
Good news, no errors were detected

SRP 50% from 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
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/out-of-stock-display-manager-for-woocommerce/oosdm-products-table.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/out-of-stock-display-manager-for-woocommerce/functions.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: product, display, stock status, shop and search, visibility...

out-of-stock-display-manager-for-woocommerce/out-of-stock-display-manager-for-woocommerce.php Passed 13 tests

This is the main PHP file of "Out of Stock Display Manager for WooCommerce" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
78 characters long description:
A handy plugin for bulk managing the visibility of your out of stock products.

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
There were no executable files found in this plugin356 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP38236356

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
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%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin