84% product-specific-email-content-for-woocommerce

Code Review | Product Specific Email Content for WooCommerce

WordPress plugin Product Specific Email Content for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: product-specific-...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 25, 2023
  • Latest release: Sep 25, 2023
  • Number of updates: 52
  • Update frequency: every 0.0 days
  • Top authors: petermorlion (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /34 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.05MB] [CPU: ▼8.99ms] Passed 4 tests

This is a short check of server-side resources used by Product Specific Email Content for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.43 ▼1.97
Dashboard /wp-admin3.36 ▲0.0251.47 ▼9.11
Posts /wp-admin/edit.php3.48 ▲0.1255.56 ▲13.88
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.84 ▼25.09
Media Library /wp-admin/upload.php3.29 ▲0.0633.97 ▲0.23

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Product Specific Email Content for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.35 ▼0.091.73 ▲0.1138.12 ▼7.03
Dashboard /wp-admin2,191 ▲115.51 ▼0.1681.20 ▼5.2638.78 ▲3.19
Posts /wp-admin/edit.php2,102 ▲21.98 ▲0.0136.35 ▼5.9633.50 ▼3.65
Add New Post /wp-admin/post-new.php1,533 ▼423.04 ▲4.88667.91 ▲60.6655.03 ▼19.87
Media Library /wp-admin/upload.php1,399 ▲24.22 ▲0.00102.35 ▲1.4743.79 ▲3.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 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 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/product-specific-email-content-for-woocommerce/public/partials/product-specific-email-content-for-woocommerce-public-display.php
    • > /wp-content/plugins/product-specific-email-content-for-woocommerce/admin/partials/product-specific-email-content-for-woocommerce-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: email, woocommerce

product-specific-email-content-for-woocommerce/product-specific-email-content-for-woocommerce.php Passed 13 tests

The main PHP script in "Product Specific Email Content for WooCommerce" version 1.3.0 is automatically included on every request by WordPress
140 characters long description:
This plugin allows you to add content to the order emails per product. This is useful if a purchased product requires some more explanation.

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
Success! There were no dangerous files found in this plugin265 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12118515230
PO File16528
CSS1247

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.29
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods312.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.39MB with 0.30MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png203.61KB46.82KB▼ 77.00%
assets/screenshot-2.png194.84KB44.35KB▼ 77.24%