78% tp-price-drop-notifier-for-woocommerce

Code Review | TP Price Drop Notifier for WooCommerce

WordPress plugin TP Price Drop Notifier for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: tp-price-drop-not...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 7, 2021
  • Latest release: Nov 1, 2023
  • Number of updates: 11
  • Update frequency: every 77.1 days
  • Top authors: tplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /645 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.28MB] [CPU: ▼4.03ms] Passed 4 tests

An overview of server-side resources used by TP Price Drop Notifier for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2332.13 ▼9.73
Dashboard /wp-admin3.66 ▲0.3183.53 ▲20.18
Posts /wp-admin/edit.php3.70 ▲0.3446.25 ▼6.45
Add New Post /wp-admin/post-new.php6.19 ▲0.3090.87 ▼2.41
Media Library /wp-admin/upload.php3.51 ▲0.2737.65 ▲2.48
Settings /wp-admin/admin.php?page=tppdn_plugin_settings_page3.4933.80
Statistics /wp-admin/admin.php?page=tppdn-statistics-page3.4738.83

Server storage [IO: ▲0.63MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 61 new files
Database: 1 new table, 60 new options
New tables
wp_tppdn_products
New WordPress options
tppdn_label_my_account_table_in_stock_yes
tppdn_loading_type
tppdn_label_my_account_table_date
tppdn_submit_background
tppdn_label_btn_title_shop_stock
tppdn_email_body
tppdn_email_body_back_to_stock
tppdn_label_your_email
tppdn_label_name_icon
tppdn_email_subject
...

Browser metrics Passed 4 tests

TP Price Drop Notifier for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,488 ▼25814.30 ▼0.060.53 ▼1.1618.37 ▼28.41
Dashboard /wp-admin2,214 ▲375.74 ▲0.0696.53 ▲5.1878.24 ▲36.68
Posts /wp-admin/edit.php2,137 ▲372.20 ▲0.2030.94 ▼9.2329.84 ▼4.74
Add New Post /wp-admin/post-new.php1,559 ▲3323.23 ▲0.13695.58 ▲66.3464.57 ▲9.33
Media Library /wp-admin/upload.php1,434 ▲344.30 ▲0.1198.33 ▲2.8060.62 ▲17.71
Settings /wp-admin/admin.php?page=tppdn_plugin_settings_page2,6972.4746.2768.81
Statistics /wp-admin/admin.php?page=tppdn-statistics-page8151.7425.0126.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 26 options
    • widget_theysaidso_widget
    • tppdn_already_registered_message
    • tppdn_label_my_account_table_price
    • tppdn_label_my_account_title
    • tppdn_label_my_account_table_in_stock
    • tppdn_label_my_account_table_image
    • tppdn_label_my_account_empty
    • tppdn_label_my_account_table_status_yes
    • theysaidso_admin_options
    • tppdn_label_my_account_table_new_price
    • ...

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

SRP 0% from 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tp-price-drop-notifier-for-woocommerce/public/partials/tp-price-drop-notifier-for-woocommerce-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp-price-drop-notifier-for-woocommerce/admin/partials/tp-price-drop-notifier-for-woocommerce-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: notifier, woocommerce product price drop, back to stock, price drop, woocommerce price track...

tp-price-drop-notifier-for-woocommerce/tp-price-drop-notifier-for-woocommerce.php 85% from 13 tests

This is the main PHP file of "TP Price Drop Notifier for WooCommerce" version 1.0.3, 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:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("4.5" instead of "3.5")

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
Success! There were no dangerous files found in this plugin4,307 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
CSS101811412,082
PHP124355721,390
HTML1110340
JavaScript42540242
JSON100210
SVG131043

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity8.71
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods39
▷ Static methods37.69%
▷ Public methods3487.18%
▷ Protected methods00.00%
▷ Private methods512.82%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
9 PNG files occupy 0.13MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/sort_both.png0.20KB0.29KB0.00%
admin/images/sort_desc_disabled.png0.14KB0.25KB0.00%
admin/images/sort_asc_disabled.png0.14KB0.25KB0.00%
admin/images/sort_asc.png0.16KB0.25KB0.00%
admin/partials/images/tp.png1.24KB0.26KB▼ 79.08%