89% product-notices-for-woocommerce

Code Review | Product Notices for WooCommerce

WordPress plugin Product Notices for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: product-notices-f...
  • Plugin version: 1.3.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2021
  • Latest release: Apr 11, 2023
  • Number of updates: 22
  • Update frequency: every 30.1 days
  • Top authors: cloudredux (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /4,534 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.10ms] Passed 4 tests

An overview of server-side resources used by Product Notices for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.56 ▲2.32
Dashboard /wp-admin3.33 ▲0.0248.93 ▼1.33
Posts /wp-admin/edit.php3.38 ▲0.0251.81 ▲1.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0297.32 ▼1.33
Media Library /wp-admin/upload.php3.25 ▲0.0237.05 ▼3.31

Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/product-notices-for-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Product Notices for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6113.15 ▼1.091.93 ▲0.1545.08 ▲0.87
Dashboard /wp-admin2,228 ▲225.83 ▲0.9497.98 ▼11.3540.53 ▼1.27
Posts /wp-admin/edit.php2,110 ▲101.99 ▼0.0339.97 ▼0.1538.23 ▲2.34
Add New Post /wp-admin/post-new.php1,552 ▲723.28 ▲0.01645.38 ▼46.0847.56 ▼11.82
Media Library /wp-admin/upload.php1,401 ▲14.21 ▼0.0596.31 ▼20.0142.88 ▼5.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

product-notices-for-woocommerce/product-notices-woocommerce.php 92% from 13 tests

The primary PHP file in "Product Notices for WooCommerce" version 1.3.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("product-notices-for-woocommerce.php" instead of "product-notices-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,078 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP64445341,293
CSS510714532
JavaScript57358252
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity31.00
▷ Minimum class complexity7.00
▷ Maximum class complexity57.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods42
▷ Static methods921.43%
▷ Public methods4095.24%
▷ Protected methods00.00%
▷ Private methods24.76%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin