63% price-alert-woocommerce

Code Review | WooCommerce Price Alert

WordPress plugin WooCommerce Price Alert scored63%from 54 tests.

About plugin

  • Plugin page: price-alert-wooco...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.2
  • WordPress version: 6.3.1
  • First release: Nov 7, 2019
  • Latest release: May 5, 2020
  • Number of updates: 23
  • Update frequency: every 7.9 days
  • Top authors: dhrubokinfotech (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /967 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

This is a short check of server-side resources used by WooCommerce Price Alert
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.99 ▼6.48
Dashboard /wp-admin3.32 ▲0.0149.60 ▲4.95
Posts /wp-admin/edit.php3.37 ▲0.0140.43 ▼25.63
Add New Post /wp-admin/post-new.php5.90 ▲0.01119.99 ▼1.17
Media Library /wp-admin/upload.php3.24 ▲0.0139.18 ▼7.84
Price Alert Setting /wp-admin/admin.php?page=wc-settings&tab=wpa3.0123.60

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 37 new files
Database: 1 new table, 7 new options
New tables
wp_WPA_subscriptions
New WordPress options
can_compress_scripts
WPA_VERSION
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Price Alert
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.29 ▼0.711.65 ▼0.3740.33 ▼17.45
Dashboard /wp-admin2,212 ▲244.84 ▼0.01113.37 ▼7.0148.07 ▲1.60
Posts /wp-admin/edit.php2,094 ▲52.12 ▲0.1141.76 ▼14.1234.58 ▼24.23
Add New Post /wp-admin/post-new.php1,539 ▼323.49 ▲5.26669.82 ▲28.4755.67 ▲4.33
Media Library /wp-admin/upload.php1,394 ▲94.31 ▲0.16112.34 ▼6.9555.28 ▼7.45
Price Alert Setting /wp-admin/admin.php?page=wc-settings&tab=wpa280.440.073.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/price-alert-woocommerce/inc/class-wpa-deactivator.php+42
    Trying to get property 'cron_hook_identifier' of non-object
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_WPA_subscriptions
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • WPA_VERSION
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=wc-settings&tab=wpa
    • > Network (severe)
    wp-admin/admin.php?page=wc-settings&tab=wpa - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: The official readme.txt is a good inspiration

price-alert-woocommerce/index.php 85% from 13 tests

This is the main PHP file of "WooCommerce Price Alert" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("price-alert-woocommerce.php" instead of "index.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected3,571 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP257251,6903,048
CSS3660378
JavaScript12020145

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity30.42
▷ Minimum class complexity1.00
▷ Maximum class complexity118.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes18
▷ Abstract classes211.11%
▷ Concrete classes1688.89%
▷ Final classes00.00%
Methods171
▷ Static methods105.85%
▷ Public methods12472.51%
▷ Protected methods4526.32%
▷ Private methods21.17%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected