83% discontinued-product-stock-status-woocommerce

Code Review | Discontinued Product Stock Status for WooCommerce

WordPress plugin Discontinued Product Stock Status for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: discontinued-prod...
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 8, 2022
  • Latest release: Aug 30, 2023
  • Number of updates: 34
  • Update frequency: every 12.3 days
  • Top authors: saffiretech (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /2,790 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.19MB] [CPU: ▼18.80ms] Passed 4 tests

This is a short check of server-side resources used by Discontinued Product Stock Status for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.26 ▼0.51
Dashboard /wp-admin3.11 ▼0.2028.59 ▼19.56
Posts /wp-admin/edit.php3.24 ▼0.1133.18 ▼13.38
Add New Post /wp-admin/post-new.php5.49 ▼0.4065.59 ▼31.61
Media Library /wp-admin/upload.php3.17 ▼0.0524.76 ▼10.65

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Discontinued Product Stock Status for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.65 ▼0.931.75 ▼0.0943.76 ▼0.88
Dashboard /wp-admin2,210 ▲225.88 ▼0.0297.78 ▼12.8938.53 ▼7.25
Posts /wp-admin/edit.php2,096 ▲72.09 ▲0.0836.23 ▲1.9930.25 ▼7.35
Add New Post /wp-admin/post-new.php1,521 ▼1223.05 ▼0.35642.99 ▼15.5852.38 ▼0.89
Media Library /wp-admin/upload.php1,398 ▲104.23 ▲0.1396.73 ▼18.3344.66 ▼3.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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)
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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/discontinued-product-stock-status-woocommerce/includes/dpssw-product-data-tabs.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/discontinued-product-stock-status-woocommerce/includes/dpssw-functions.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

discontinued-product-stock-status-woocommerce/discontinued-products-stock-status.php 77% from 13 tests

The primary PHP file in "Discontinued Product Stock Status for WooCommerce" version 1.1.4 is used by WordPress to initiate all plugin functionality
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
  • Description: Please keep the plugin description shorter than 140 characters (currently 283 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("discontinued-product-stock-status-woocommerce.php" instead of "discontinued-products-stock-status.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin976 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3235313814
JavaScript15934153
CSS1109

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions46
▷ Named functions4597.83%
▷ Anonymous functions12.17%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin