90% woodiscontinued

Code Review | Discontinued Stock Status For WooCommerce

WordPress plugin Discontinued Stock Status For WooCommerce scored 90% from 54 tests.

About plugin

  • Plugin page: woodiscontinued
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 16, 2018
  • Latest release: Oct 16, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: ncpenn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 515 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 gracefully, with no errors

Server metrics [RAM: ▼0.65MB] [CPU: ▼20.18ms] Passed 4 tests

This is a short check of server-side resources used by Discontinued Stock Status For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0322.87 ▼19.86
Dashboard /wp-admin3.35 ▲0.0545.45 ▼2.82
Posts /wp-admin/edit.php3.40 ▲0.0442.46 ▼3.89
Add New Post /wp-admin/post-new.php3.23 ▼2.6635.40 ▼54.16
Media Library /wp-admin/upload.php3.27 ▲0.0435.14 ▼1.97

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

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

Browser metrics Passed 4 tests

Discontinued Stock Status For WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,470 ▼26514.48 ▲0.270.57 ▼1.1415.89 ▼27.84
Dashboard /wp-admin2,214 ▲235.83 ▲0.9598.27 ▼19.9238.88 ▼3.22
Posts /wp-admin/edit.php2,094 ▲52.05 ▲0.0333.92 ▼0.8032.67 ▼3.31
Add New Post /wp-admin/post-new.php1,538 ▲223.48 ▲0.33667.32 ▲18.9376.49 ▲6.07
Media Library /wp-admin/upload.php1,393 ▲54.20 ▲0.0492.73 ▼6.9342.99 ▼1.14

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: discontinued stock status, woocommerce

woodiscontinued/woodiscontinued.php Passed 13 tests

The main file in "Discontinued Stock Status For WooCommerce" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
129 characters long description:
Now you can keep products in your catalog even if they are permanently discontinued. Works for both simple and variable products.

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
Everything looks great! No dangerous files found in this plugin262 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP43112186
JavaScript213176

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin