77% back-in-stock-notifier-for-woocommerce

Code Review | Back In Stock Notifier for WooCommerce | WooCommerce Waitlist Pro

WordPress plugin Back In Stock Notifier for WooCommerce | WooCommerce Waitlist Pro scored77%from 54 tests.

About plugin

  • Plugin page: back-in-stock-not...
  • Plugin version: 5.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 13, 2018
  • Latest release: Nov 30, 2023
  • Number of updates: 91
  • Update frequency: every 22.6 days
  • Top authors: codewoogeek (100%)

Code review

54 tests

User reviews

97 reviews

Install metrics

20,000+ active /376,115 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.84ms] Passed 4 tests

Server-side resources used by Back In Stock Notifier for WooCommerce | WooCommerce Waitlist Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.03 ▼5.50
Dashboard /wp-admin3.31 ▲0.0151.29 ▲1.96
Posts /wp-admin/edit.php3.43 ▲0.0747.51 ▼0.53
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.68 ▼0.97
Media Library /wp-admin/upload.php3.24 ▲0.0134.46 ▼0.34

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Back In Stock Notifier for WooCommerce | WooCommerce Waitlist Pro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.54 ▲0.281.79 ▼0.1440.75 ▼4.56
Dashboard /wp-admin2,198 ▲245.61 ▲0.0786.06 ▼18.1736.57 ▼9.94
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0438.91 ▲0.7335.95 ▼0.57
Add New Post /wp-admin/post-new.php1,526 ▼023.38 ▼0.44668.21 ▼8.7475.35 ▲14.99
Media Library /wp-admin/upload.php1,397 ▼64.19 ▲0.0296.18 ▼4.9142.38 ▼1.70

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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

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 fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/back-in-stock-notifier-for-woocommerce/includes/class-popup.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'CWG_Instock_Mailer' not found in wp-content/plugins/back-in-stock-notifier-for-woocommerce/includes/class-test-mail.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CWG_Instock_Mailer' not found in wp-content/plugins/back-in-stock-notifier-for-woocommerce/includes/class-instock-mail.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/back-in-stock-notifier-for-woocommerce/includes/library/wp-background-process.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CWG_Instock_Mailer' not found in wp-content/plugins/back-in-stock-notifier-for-woocommerce/includes/class-subscription-mail.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/back-in-stock-notifier-for-woocommerce/templates/default-form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/back-in-stock-notifier-for-woocommerce/includes/library/stevegrunwell/wp-admin-tabbed-settings-pages/wp-admin-tabbed-settings-pages.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • License uri: Invalid URI ("[https://www.gnu.org/licenses/gpl-3.0.txt](https://www.gnu.org/licenses/gpl-3.0.txt)")
  • Donate link: Invalid URI ("[https://codewoogeek.online/product-category/back-in-stock-notifier/](https://codewoogeek.online/product-category/back-in-stock-notifier/)")
You can look at the official readme.txt

back-in-stock-notifier-for-woocommerce/cwginstocknotifier.php 85% from 13 tests

The main file in "Back In Stock Notifier for WooCommerce | WooCommerce Waitlist Pro" v. 5.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "2.2.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("back-in-stock-notifier-for-woocommerce.php" instead of "cwginstocknotifier.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 plugin9,582 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP368021,2715,475
JavaScript113963542,729
CSS632301,310
JSON10046
Markdown115022

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.46
Average class complexity29.38
▷ Minimum class complexity1.00
▷ Maximum class complexity187.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes34
▷ Abstract classes411.76%
▷ Concrete classes3088.24%
▷ Final classes00.00%
Methods375
▷ Static methods61.60%
▷ Public methods33789.87%
▷ Protected methods287.47%
▷ Private methods102.67%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants11
▷ Global constants872.73%
▷ Class constants327.27%
▷ Public constants3100.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
2 PNG files occupy 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/flags.png69.20KB23.42KB▼ 66.16%
assets/img/flags@2x.png170.28KB68.04KB▼ 60.04%