84% woocommerce-notify-updated-product

Code Review | Woocommerce Notify Updated Product

WordPress plugin Woocommerce Notify Updated Product scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-notif...
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 13, 2015
  • Latest release: Mar 16, 2023
  • Number of updates: 15
  • Update frequency: every 195.0 days
  • Top authors: eggemplo (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /3,680 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Woocommerce Notify Updated Product
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.74 ▼4.04
Dashboard /wp-admin3.31 ▼0.0443.70 ▼18.53
Posts /wp-admin/edit.php3.36 ▲0.0046.54 ▲3.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.14 ▼10.61
Media Library /wp-admin/upload.php3.23 ▲0.0032.75 ▼2.04

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce Notify Updated Product
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.411.93 ▼0.0036.23 ▼10.71
Dashboard /wp-admin2,209 ▲215.91 ▲1.04109.96 ▼7.0242.37 ▼3.22
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0439.78 ▲5.9734.79 ▼3.04
Add New Post /wp-admin/post-new.php1,514 ▼2217.40 ▼5.87647.67 ▼16.6554.75 ▲0.84
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0295.32 ▼18.2641.97 ▼6.64

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-notify-updated-product/core/class-wordpress-woonotifyupdatedproduct.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/woocommerce-notify-updated-product/woo-notify-updated-product.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woocommerce-notify-updated-product/core/class-woonotifyupdatedproduct.php:30
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woocommerce-notify-updated-product/woo-notify-updated-product.php on line 37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (General Settings.), #2 (Product settings.), #3 (Email received.)
The official readme.txt might help

woocommerce-notify-updated-product/woo-notify-updated-product.php 92% from 13 tests

The primary PHP file in "Woocommerce Notify Updated Product" version 1.5.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-notify-updated-product.php" instead of "woo-notify-updated-product.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin453 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP39263372
PO File16313581

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.33
▷ Minimum class complexity5.00
▷ Maximum class complexity26.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16100.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.15MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png50.18KB18.60KB▼ 62.94%
screenshot-3.png12.76KB5.61KB▼ 56.05%
screenshot-1.png94.96KB33.08KB▼ 65.16%