68% product-stock-alert-woocommerce

Code Review | Product Stock Alert Woocommerce

WordPress plugin Product Stock Alert Woocommerce scored68%from 54 tests.

About plugin

  • Plugin page: product-stock-ale...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.2
  • WordPress version: 6.3.1
  • First release: Dec 1, 2019
  • Latest release: Apr 30, 2020
  • Number of updates: 8
  • Update frequency: every 19.1 days
  • Top authors: dhrubokinfotech (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /932 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼1.49ms] Passed 4 tests

Server-side resources used by Product Stock Alert Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.77 ▼1.52
Dashboard /wp-admin3.41 ▲0.1150.33 ▼1.41
Posts /wp-admin/edit.php3.52 ▲0.1756.25 ▲4.84
Add New Post /wp-admin/post-new.php6.01 ▲0.1294.89 ▼5.05
Media Library /wp-admin/upload.php3.33 ▲0.1036.60 ▲2.02
Product Stock Alert /wp-admin/options-general.php?page=instocksettings3.3037.85

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 25 new files
Database: 1 new table, 7 new options
New tables
wp_Product_stock_alert
New WordPress options
Product_stock_alert_db_version
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Product Stock Alert Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12913.45 ▼1.188.25 ▲6.2840.70 ▼3.80
Dashboard /wp-admin2,209 ▲295.67 ▲0.0194.43 ▼1.5439.79 ▼2.96
Posts /wp-admin/edit.php2,114 ▲142.02 ▲0.0239.60 ▲2.9237.84 ▲1.57
Add New Post /wp-admin/post-new.php1,539 ▲1123.18 ▼0.03646.92 ▼13.9959.76 ▲5.12
Media Library /wp-admin/upload.php1,417 ▲144.31 ▲0.1199.83 ▼6.2842.60 ▼3.19
Product Stock Alert /wp-admin/options-general.php?page=instocksettings1,0361.8025.4529.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_Product_stock_alert
  • The uninstall procedure has failed, leaving 7 options in the database
    • Product_stock_alert_db_version
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/product-stock-alert-woocommerce/admin/partials/product-stock-alert-woocommerce-admin-display.php
    • > /wp-content/plugins/product-stock-alert-woocommerce/public/partials/product-stock-alert-woocommerce-public-display.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=instocksettings
    • > Network (severe)
    wp-content/plugins/product-stock-alert-woocommerce/assets/css/icon-256x256x.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
The official readme.txt is a good inspiration

product-stock-alert-woocommerce/product-stock-alert-woocommerce.php Passed 13 tests

The principal PHP file in "Product Stock Alert Woocommerce" v. 1.0.0 is loaded by WordPress automatically on each request
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin534 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP12141557451
JavaScript3106245
CSS442238

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin