84% image-watermark

Code Review | Image Watermark

WordPress plugin Image Watermark scored 84% from 54 tests.

About plugin

  • Plugin page: image-watermark
  • Plugin version: 1.7.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2013
  • Latest release: Apr 17, 2023
  • Number of updates: 83
  • Update frequency: every 44.1 days
  • Top authors: dfactory (100%)

Code review

54 tests

User reviews

177 reviews

Install metrics

50,000+ active / 807,038 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▼0.82ms] Passed 4 tests

This is a short check of server-side resources used by Image Watermark
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4246.23 ▼0.70
Dashboard /wp-admin3.73 ▲0.4254.03 ▼10.12
Posts /wp-admin/edit.php3.84 ▲0.4854.07 ▲1.11
Add New Post /wp-admin/post-new.php6.31 ▲0.42101.81 ▲6.42
Media Library /wp-admin/upload.php3.76 ▲0.5252.34 ▲13.81
Watermark /wp-admin/options-general.php?page=watermark-options3.6546.44

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Image Watermark
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲413.24 ▼0.341.98 ▲0.0143.96 ▼0.07
Dashboard /wp-admin2,210 ▲15.85 ▲1.00109.32 ▼7.0143.09 ▼1.13
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0542.00 ▲5.7636.64 ▲2.47
Add New Post /wp-admin/post-new.php1,550 ▲1724.18 ▲1.00649.29 ▼153.8656.29 ▼2.26
Media Library /wp-admin/upload.php1,428 ▲404.18 ▼0.03108.83 ▲8.8846.08 ▲0.79
Watermark /wp-admin/options-general.php?page=watermark-options1,6263.5974.3882.32

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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 no errors were found, this is by no means 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=watermark-options
    • > Network (severe)
    wp-content/plugins/image-watermark/images/df-black-sm.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes: Please take inspiration from this readme.txt

image-watermark/image-watermark.php 92% from 13 tests

The primary PHP file in "Image Watermark" version 1.7.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin2,733 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP43576151,304
JavaScript5130127726
CSS251160703

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity102.00
▷ Minimum class complexity4.00
▷ Maximum class complexity214.00
Average method complexity5.15
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods73
▷ Static methods11.37%
▷ Public methods5879.45%
▷ Protected methods00.00%
▷ Private methods1520.55%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo-dfactory.png2.92KB1.92KB▼ 34.20%
css/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
css/images/bg_fallback.png3.63KB0.30KB▼ 91.72%
css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
css/images/slider_handles.png1.90KB1.31KB▼ 30.90%