83% product-image-watermark-for-woo

Code Review | Product Image Watermark for Woo

WordPress plugin Product Image Watermark for Woo scored 83% from 54 tests.

About plugin

  • Plugin page: product-image-wat...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Jun 11, 2020
  • Latest release: Mar 21, 2022
  • Number of updates: 11
  • Update frequency: every 59.0 days
  • Top authors: wppluginexperts (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active / 6,085 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.52ms] Passed 4 tests

This is a short check of server-side resources used by Product Image Watermark for Woo
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.74 ▼5.00
Dashboard /wp-admin3.31 ▲0.0147.24 ▼5.70
Posts /wp-admin/edit.php3.36 ▲0.0043.37 ▼1.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.63 ▲5.39
Media Library /wp-admin/upload.php3.23 ▲0.0038.63 ▲2.55
Product Image Watermark for Woo /wp-admin/admin.php?page=product-image-watermark-for-woo3.0029.39
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius3.0019.36

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 193 new files
Database: no new tables, 10 new options
New WordPress options
fs_gdpr
fs_debug_mode
widget_recent-comments
can_compress_scripts
fs_active_plugins
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
fs_accounts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Image Watermark for Woo
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.28 ▼0.951.80 ▲0.0643.60 ▼1.23
Dashboard /wp-admin2,206 ▲155.89 ▲1.03100.01 ▼4.1342.00 ▼3.41
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0439.45 ▲3.5138.12 ▲4.74
Add New Post /wp-admin/post-new.php1,533 ▼323.08 ▼0.05636.01 ▼201.1250.50 ▼8.09
Media Library /wp-admin/upload.php1,388 ▼04.27 ▲0.06102.05 ▼16.5644.85 ▼5.88
Product Image Watermark for Woo /wp-admin/admin.php?page=product-image-watermark-for-woo280.440.103.56
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius280.440.093.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • fs_active_plugins
    • db_upgraded
    • fs_debug_mode
    • widget_recent-comments
    • fs_gdpr
    • theysaidso_admin_options
    • fs_accounts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=product-image-watermark-for-woo
    • > Network (severe)
    wp-admin/admin.php?page=product-image-watermark-for-woo - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Network (severe)
    wp-admin/admin.php?page=freemius - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: You are using too many tags: 34 tag instead of maximum 10
  • Screenshots: Screenshot #1 (General settings) image missing
You can look at the official readme.txt

product-image-watermark-for-woo/product-image-watermark-for-woo.php 77% from 13 tests

The principal PHP file in "Product Image Watermark for Woo" v. 1.0.4 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin47,002 lines of code in 147 files:
LanguageFilesBlank linesComment linesLines of code
PHP1167,72216,49931,088
PO File126,9608,45515,240
JavaScript510776401
Markdown1680214
CSS124032
JSON10027

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity82.12
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,165
▷ Static methods17314.85%
▷ Public methods82570.82%
▷ Protected methods151.29%
▷ Private methods32527.90%
Functions102
▷ Named functions102100.00%
▷ Anonymous functions00.00%
Constants132
▷ Global constants10781.06%
▷ Class constants2518.94%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
includes/images/preview.png34.46KB8.53KB▼ 75.24%
freemius/assets/img/product-image-watermark-for-woo.png9.16KB5.26KB▼ 42.58%