73% stock-notifier-for-woocommerce

Code Review | Back in Stock Notifier for WooCommerce - Easy in-stock Notifier with Multivendor Support

WordPress plugin Back in Stock Notifier for WooCommerce - Easy in-stock Notifier with Multivendor Support scored73%from 54 tests.

About plugin

  • Plugin page: stock-notifier-fo...
  • Plugin version: 2.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 25, 2022
  • Latest release: Nov 9, 2023
  • Number of updates: 46
  • Update frequency: every 14.2 days
  • Top authors: azizultex (73.91%)wppool (19.57%)naeemkhan25 (10.87%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,367 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▲3.62ms] Passed 4 tests

This is a short check of server-side resources used by Back in Stock Notifier for WooCommerce - Easy in-stock Notifier with Multivendor Support
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4043.89 ▲8.09
Dashboard /wp-admin3.71 ▲0.4152.22 ▲6.70
Posts /wp-admin/edit.php3.76 ▲0.3953.89 ▲7.70
Add New Post /wp-admin/post-new.php6.24 ▲0.3588.82 ▼8.01
Media Library /wp-admin/upload.php3.58 ▲0.3443.39 ▲11.03

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 119 new files
Database: 1 new table, 10 new options
New tables
wp_stock_notifier_popular_product
New WordPress options
widget_recent-comments
stock_notifier_dokan_notifier_on_off_1
stock_notifier_wp_sms_active
widget_theysaidso_widget
stock_notifier_free_active
db_upgraded
stock_notifier_version
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Back in Stock Notifier for WooCommerce - Easy in-stock Notifier with Multivendor Support
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲22714.41 ▼0.301.92 ▲0.1443.79 ▼0.96
Dashboard /wp-admin2,357 ▲1805.52 ▼0.0885.35 ▼6.9979.85 ▲40.06
Posts /wp-admin/edit.php2,275 ▲1752.12 ▲0.1135.13 ▼1.9835.38 ▲0.81
Add New Post /wp-admin/post-new.php1,851 ▲32521.17 ▼2.02709.72 ▲23.8054.09 ▼2.78
Media Library /wp-admin/upload.php1,568 ▲1714.17 ▼0.01104.93 ▲3.1675.39 ▲33.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_stock_notifier_popular_product
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • stock_notifier_version
    • db_upgraded
    • stock_notifier_free_active
    • stock_notifier_dokan_notifier_on_off_1
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • stock_notifier_wp_sms_active

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/stock-notifier-for-woocommerce/includes/recommended/recommended-plugins.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stock-notifier-for-woocommerce/includes/class-popup-ajax.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Stock request), #2 (SMS Gateway configuration), #3 (Subscribers), #5 (Notification Setting), #6 (Message Setting), #7 (Visibility Switch), #8 (Advanced Settings), #9 (Multivendor Setting), #10 (User account management), #11 (Notification status), #12 (Signup stats), #13 (Product Popularity), #14 (Vendor Popularity), #15 (Multivendor dashboard)
The official readme.txt might help

stock-notifier-for-woocommerce/stock-notifier-for-woocommerce.php 77% from 13 tests

The main file in "Back in Stock Notifier for WooCommerce - Easy in-stock Notifier with Multivendor Support" v. 2.1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/languages/")
  • Description: The description should be shorter than 140 characters (currently 180 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin12,858 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
PHP268633,1136,711
JavaScript121277344,807
SVG2500549
CSS4418511
Markdown1870255
JSON10025

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.39
Average class complexity37.96
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes14.55%
Methods345
▷ Static methods123.48%
▷ Public methods26175.65%
▷ Protected methods92.61%
▷ Private methods7521.74%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
33 PNG files occupy 1.31MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/settings.PNG65.37KB27.69KB▼ 57.65%
assets/setting/6b211e977bd45e0f06685dc4d797a396.png5.20KB2.57KB▼ 50.48%
assets/dokan/c4196d3286cc33244c83.png0.15KB0.25KB0.00%
assets/dokan/07c018ae0160704a3290.png0.14KB0.25KB0.00%
assets/dokan/8b117faa9d4dd934d6bb.png0.20KB0.29KB0.00%