78% watermark-images-for-wp-and-woo-grandpluginswp

Code Review | Watermark Images, Stamp Images, WooCommerce Image Watermark, Product Watermark for WooCommerce

WordPress plugin Watermark Images, Stamp Images, WooCommerce Image Watermark, Product Watermark for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: watermark-images-...
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Dec 9, 2021
  • Latest release: Sep 12, 2023
  • Number of updates: 23
  • Update frequency: every 28.0 days
  • Top authors: grandplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,739 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.87MB] [CPU: ▼4.49ms] Passed 4 tests

An overview of server-side resources used by Watermark Images, Stamp Images, WooCommerce Image Watermark, Product Watermark for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.33 ▲0.8645.46 ▲9.16
Dashboard /wp-admin4.17 ▲0.8747.50 ▼12.67
Posts /wp-admin/edit.php4.22 ▲0.8750.47 ▲0.49
Add New Post /wp-admin/post-new.php6.76 ▲0.8889.24 ▼11.04
Media Library /wp-admin/upload.php4.09 ▲0.8737.72 ▲5.28
Bulk Apply /wp-admin/edit.php?post_type=gpls-wmfw-watermark&page=gpls-wmfw-watermark-image-for-wordpress-bulk-apply-tab4.1238.32
Watermarks Templates /wp-admin/edit.php?post_type=gpls-wmfw-watermark4.1437.10
Add New /wp-admin/post-new.php?post_type=gpls-wmfw-watermark4.0942.88
Single Editor /wp-admin/edit.php?post_type=gpls-wmfw-watermark&page=gpls-wmfw-watermark-image-for-wordpress-single-apply-tab3.9331.39
Settings /wp-admin/edit.php?post_type=gpls-wmfw-watermark&page=gpls-wmfw-watermark-image-for-wordpress-settings-tab4.1033.78

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 101 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Watermark Images, Stamp Images, WooCommerce Image Watermark, Product Watermark for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.21 ▼0.142.13 ▲0.4944.11 ▲2.35
Dashboard /wp-admin2,238 ▲585.56 ▼0.0981.28 ▼6.8879.07 ▲39.70
Posts /wp-admin/edit.php2,140 ▲402.00 ▲0.0335.63 ▼5.8036.29 ▲0.27
Add New Post /wp-admin/post-new.php1,713 ▲18722.18 ▼0.93745.42 ▲98.3747.42 ▼1.25
Media Library /wp-admin/upload.php1,434 ▲374.14 ▼0.1094.00 ▼7.0571.69 ▲24.67
Bulk Apply /wp-admin/edit.php?post_type=gpls-wmfw-watermark&page=gpls-wmfw-watermark-image-for-wordpress-bulk-apply-tab1,3293.7147.8481.82
Watermarks Templates /wp-admin/edit.php?post_type=gpls-wmfw-watermark1,1091.9330.5224.78
Add New /wp-admin/post-new.php?post_type=gpls-wmfw-watermark3,3014.6489.6683.23
Single Editor /wp-admin/edit.php?post_type=gpls-wmfw-watermark&page=gpls-wmfw-watermark-image-for-wordpress-single-apply-tab2,0843.8754.2827.56
Settings /wp-admin/edit.php?post_type=gpls-wmfw-watermark&page=gpls-wmfw-watermark-image-for-wordpress-settings-tab1,6223.5842.6882.89

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=gpls-wmfw-watermark&page=gpls-wmfw-watermark-image-for-wordpress-settings-tab
    • > Warning in wp-admin/includes/file.php+152
    opendir(wp-content/uploads/gpls-wmfw-watermark-image-for-wordpress/): failed to open dir: No such file or directory

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WMFW\\Watermark_Base' not found in wp-content/plugins/watermark-images-for-wp-and-woo-grandpluginswp/includes/class-imagick-image.php:10
    • > PHP Fatal error
      Trait 'GPLSCore\\GPLS_PLUGIN_WMFW\\Helpers' not found in wp-content/plugins/watermark-images-for-wp-and-woo-grandpluginswp/includes/class-apply-watermarks-queries.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WMFW\\Watermark_Base' not found in wp-content/plugins/watermark-images-for-wp-and-woo-grandpluginswp/includes/class-gd-image.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed: The official readme.txt is a good inspiration

watermark-images-for-wp-and-woo-grandpluginswp/gpls-wmfw-watermark-image-for-wordpress.php 92% from 13 tests

Analyzing the main PHP file in "Watermark Images, Stamp Images, WooCommerce Image Watermark, Product Watermark for WooCommerce" version 1.1.6
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("watermark-images-for-wp-and-woo-grandpluginswp.php" instead of "gpls-wmfw-watermark-image-for-wordpress.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
Success! There were no dangerous files found in this plugin4,805 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP336231,6384,792
JavaScript100198
CSS5055

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity30.53
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods191
▷ Static methods12062.83%
▷ Public methods16887.96%
▷ Protected methods84.19%
▷ Private methods157.85%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants0
▷ Global constants00.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
10 PNG files occupy 0.13MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/dist/images/full-logo.png6.58KB3.86KB▼ 41.28%
core/assets/images/woo-quick-view-and-buy-now.png23.32KB8.67KB▼ 62.81%
core/assets/dist/images/logo-icon-md.png0.91KB0.96KB0.00%
core/assets/images/image-sizes-controller.png13.06KB5.90KB▼ 54.82%
core/assets/dist/images/logo-icon-sm.png0.62KB0.72KB0.00%