10% signature-watermark

Code Review | Signature Watermark

WordPress plugin Signature Watermark scored10%from 54 tests.

About plugin

  • Plugin page: signature-watermark
  • Plugin version: 1.7.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1
  • WordPress version: 6.3.1
  • First release: Sep 7, 2012
  • Latest release: Feb 14, 2015
  • Number of updates: 61
  • Update frequency: every 14.6 days
  • Top authors: ChrisHurst (86.89%)MyWebsiteAdvisor (14.75%)

Code review

54 tests

User reviews

9 reviews

Install metrics

300+ active /44,718 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/signature-watermark/signature-watermark-plugin.php+76
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.72MB] [CPU: ▼54.71ms] Passed 4 tests

A check of server-side resources used by Signature Watermark
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.54 ▼1.199.62 ▼34.73
Dashboard /wp-admin2.56 ▼1.009.52 ▼45.04
Posts /wp-admin/edit.php2.56 ▼1.1211.24 ▼43.05
Add New Post /wp-admin/post-new.php2.56 ▼3.5910.48 ▼96.01
Media Library /wp-admin/upload.php2.56 ▼0.939.97 ▼29.70
Signature Watermark /wp-admin/options-general.php?page=signature-watermark-settings2.569.20

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Signature Watermark
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.37 ▼0.061.71 ▼0.3043.40 ▲2.90
Dashboard /wp-admin2,199 ▲195.64 ▼0.0499.62 ▲8.8442.80 ▲1.24
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0138.17 ▼4.9635.42 ▼0.31
Add New Post /wp-admin/post-new.php1,548 ▲323.32 ▲0.28654.14 ▼59.5749.72 ▼7.96
Media Library /wp-admin/upload.php1,401 ▲14.21 ▲0.0098.74 ▼8.7244.18 ▼3.81
Signature Watermark /wp-admin/options-general.php?page=signature-watermark-settings1,99813.38394.6442.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > Notice in wp-content/plugins/signature-watermark/signature-watermark-plugin.php+76
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=signature-watermark-settings
    • > Notice in wp-content/plugins/signature-watermark/signature-watermark-plugin.php+76
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=signature-watermark-settings
    • > Notice in wp-content/plugins/signature-watermark/signature-watermark-plugin.php+76
    Trying to access array offset on value of type null

SRP 50% from 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
The following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/admin.php): failed to open stream: No such file or directory in wp-content/plugins/signature-watermark/signature-watermark-plugin-installer.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/signature-watermark/signature-watermark-plugin-installer.php on line 7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/signature-watermark/signature-watermark-plugin-installer.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/signature-watermark/signature-watermark-loader.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add images for these screenshots: #1 (General Settings Page), #2 (Text Watermark Settings Page), #3 (Image Watermark Settings Page), #4 (Watermark Preview Page), #5 (Finished Example Image)
Please take inspiration from this readme.txt

signature-watermark/signature-watermark-loader.php 92% from 13 tests

The main PHP script in "Signature Watermark" version 1.7.12 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("signature-watermark.php" instead of "signature-watermark-loader.php")

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
There were no executable files found in this plugin1,639 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP59323171,613
JavaScript110426

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity44.00
▷ Minimum class complexity30.00
▷ Maximum class complexity63.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods5677.78%
▷ Protected methods00.00%
▷ Private methods1622.22%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
watermark-logo.png74.58KB34.65KB▼ 53.54%