10% woo-watchlist-notifications

Code Review | Woocommerce Watchlist Notifications

WordPress plugin Woocommerce Watchlist Notifications scored10%from 54 tests.

About plugin

  • Plugin page: woo-watchlist-not...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Dec 18, 2017
  • Latest release: Dec 28, 2017
  • Number of updates: 8
  • Update frequency: every 1.4 days
  • Top authors: priyajain2802 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /631 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WWN::wwn_install() should not be called statically

Server metrics [RAM: ▲0.10MB] [CPU: ▲2.31ms] Passed 4 tests

Analyzing server-side resources used by Woocommerce Watchlist Notifications
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0848.31 ▲6.58
Dashboard /wp-admin3.41 ▲0.1153.57 ▲4.72
Posts /wp-admin/edit.php3.51 ▲0.1555.38 ▲6.66
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.26 ▼8.73
Media Library /wp-admin/upload.php3.33 ▲0.1142.79 ▲9.75

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: 1 new table, 6 new options
New tables
wp_woocommerce_watchlist_notification
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce Watchlist Notifications
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲21013.89 ▼0.8610.97 ▲9.0241.31 ▼0.50
Dashboard /wp-admin2,226 ▲385.88 ▼0.05105.40 ▲2.0040.92 ▼1.75
Posts /wp-admin/edit.php2,112 ▲232.05 ▲0.0138.64 ▼1.5534.00 ▼0.18
Add New Post /wp-admin/post-new.php1,531 ▼317.67 ▼5.49667.87 ▲4.5350.82 ▼23.14
Media Library /wp-admin/upload.php1,408 ▲264.42 ▲0.2198.25 ▲1.2546.58 ▲5.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_woocommerce_watchlist_notification
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-watchlist-notifications/assets/css/dynamic-style.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/woo-watchlist-notifications/woocommerce-watchlist-notification.php on line 39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: woocommerce, new product watchlist, watchlist, email notifications, new arrival notification

woo-watchlist-notifications/woocommerce-watchlist-notification.php 85% from 13 tests

This is the main PHP file of "Woocommerce Watchlist Notifications" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-watchlist-notifications.php" instead of "woocommerce-watchlist-notification.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,163 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4104154920
JavaScript3268198
CSS20245

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity27.00
▷ Minimum class complexity17.00
▷ Maximum class complexity38.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods43
▷ Static methods12.33%
▷ Public methods4297.67%
▷ Protected methods00.00%
▷ Private methods12.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/twitter.png0.69KB0.73KB0.00%
assets/images/email.png0.61KB0.64KB0.00%
assets/images/facebook.png0.59KB0.62KB0.00%