90% product-notes-for-woocommerce

Code Review | Product Notes for WooCommerce

WordPress plugin Product Notes for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: product-notes-for...
  • Plugin version: 2.9.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Aug 12, 2020
  • Latest release: Oct 3, 2023
  • Number of updates: 36
  • Update frequency: every 31.9 days
  • Top authors: algoritmika (86.11%)wpcodefactory (16.67%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /13,476 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Product Notes for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.64 ▼1.11
Dashboard /wp-admin3.32 ▲0.0248.71 ▼6.15
Posts /wp-admin/edit.php3.37 ▲0.0251.98 ▲1.83
Add New Post /wp-admin/post-new.php5.90 ▲0.02105.30 ▲6.02
Media Library /wp-admin/upload.php3.25 ▲0.0235.56 ▼2.18

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Product Notes for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.64 ▲0.081.95 ▼0.2546.26 ▲2.21
Dashboard /wp-admin2,192 ▲185.55 ▼0.0586.14 ▼5.4439.91 ▼2.08
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0434.50 ▼5.0940.06 ▼1.35
Add New Post /wp-admin/post-new.php1,528 ▲223.38 ▲0.38653.18 ▼8.2353.24 ▼0.11
Media Library /wp-admin/upload.php1,394 ▼64.23 ▲0.0698.92 ▼10.8542.82 ▼3.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: woocommerce, woo commerce, product, product note

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

The main PHP script in "Product Notes for WooCommerce" version 2.9.4 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("product-notes-for-woocommerce.php" instead of "internal-product-notes-for-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 plugin1,502 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP111606751,466
JavaScript243136

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity17.89
▷ Minimum class complexity3.00
▷ Maximum class complexity44.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods70
▷ Static methods11.43%
▷ Public methods70100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected