73% image-watermark-wp

Code Review | Image Watermark WP

WordPress plugin Image Watermark WP scored73%from 54 tests.

About plugin

  • Plugin page: image-watermark-wp
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 24, 2016
  • Latest release: Feb 25, 2016
  • Number of updates: 21
  • Update frequency: every 17.4 days
  • Top authors: umarfaiz (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /48,804 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.28MB] [CPU: ▼3.23ms] Passed 4 tests

Analyzing server-side resources used by Image Watermark WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2642.13 ▼4.38
Dashboard /wp-admin3.58 ▲0.2748.26 ▼9.18
Posts /wp-admin/edit.php3.69 ▲0.3355.03 ▲9.09
Add New Post /wp-admin/post-new.php6.16 ▲0.2797.14 ▼4.58
Media Library /wp-admin/upload.php3.61 ▲0.3840.13 ▲5.21
Watermark /wp-admin/options-general.php?page=watermark-options3.5039.43

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Image Watermark WP
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3313.29 ▼1.094.86 ▲2.6942.56 ▼2.71
Dashboard /wp-admin2,225 ▲194.84 ▼1.05108.70 ▲1.5942.73 ▼0.90
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0441.01 ▲4.2635.57 ▼1.45
Add New Post /wp-admin/post-new.php1,552 ▲2023.37 ▲0.22668.28 ▼51.2569.19 ▲12.03
Media Library /wp-admin/upload.php1,444 ▲474.28 ▲0.0199.06 ▼2.6842.63 ▼0.92
Watermark /wp-admin/options-general.php?page=watermark-options1,5403.5162.9471.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/image-watermark-wp/image-watermark-wp.php+117
    Undefined index: image_watermark_image
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=watermark-options
    • > Network (severe)
    http://logicsfort.com/img/paypal-donate-button.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=watermark-options
    • > Network (severe)
    http://www.logicsfort.com/img/c-logo.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (/assets/watermark-screenshot-1.png), #2 (/assets/watermark-screenshot-2.png), #3 (/assets/watermark-screenshot-3.png)
Please take inspiration from this readme.txt

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

The main PHP script in "Image Watermark WP" version 1.0.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,676 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PO File4395532920
PHP2186236819
CSS239160608
JavaScript33221329

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity162.00
▷ Minimum class complexity162.00
▷ Maximum class complexity162.00
Average method complexity4.74
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods3786.05%
▷ Protected methods00.00%
▷ Private methods613.95%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 2.43MB with 1.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png608.52KB234.69KB▼ 61.43%
css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
css/images/bg_fallback.png3.63KB0.30KB▼ 91.72%
css/images/slider_handles@2x.png3.52KB2.66KB▼ 24.54%
assets/watermark-screenshot-2.png115.83KB33.89KB▼ 70.74%