10% watermark-reloaded

Code Review | Watermark RELOADED

WordPress plugin Watermark RELOADED scored10%from 54 tests.

About plugin

  • Plugin page: watermark-reloaded
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2010
  • Latest release: Feb 25, 2015
  • Number of updates: 69
  • Update frequency: every 26.5 days
  • Top authors: sverde1 (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /168,144 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/watermark-reloaded/watermark-reloaded.php+466
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.25ms] Passed 4 tests

Analyzing server-side resources used by Watermark RELOADED
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0133.49 ▼4.44
Dashboard /wp-admin3.33 ▲0.0344.86 ▼0.67
Posts /wp-admin/edit.php3.38 ▲0.0245.97 ▲0.05
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.50 ▼7.39
Media Library /wp-admin/upload.php3.25 ▲0.0232.71 ▼0.49
Watermark Reloaded /wp-admin/options-general.php?page=watermark-reloaded/watermark-reloaded.php3.2234.23

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 52 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
watermark_text

Browser metrics Passed 4 tests

Watermark RELOADED: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲14213.32 ▼1.081.76 ▼0.0240.79 ▼5.61
Dashboard /wp-admin2,283 ▲974.88 ▼1.03103.72 ▼7.2642.37 ▼6.23
Posts /wp-admin/edit.php2,096 ▲72.02 ▼0.0139.91 ▲2.3136.46 ▲3.71
Add New Post /wp-admin/post-new.php1,545 ▲3118.46 ▲0.84687.02 ▲5.1752.97 ▼1.18
Media Library /wp-admin/upload.php1,392 ▲74.23 ▲0.0193.10 ▼5.4341.24 ▼4.45
Watermark Reloaded /wp-admin/options-general.php?page=watermark-reloaded/watermark-reloaded.php1,2111.9532.3532.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • watermark_text
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/watermark-reloaded/watermark-loader.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/watermark-reloaded/watermark-reloaded.php:440

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Screenshot of Watermark RELOADED settings page), #2 (Example of a picture watermarked with above settings), #3 (Teaser screenshot of Watermark RELOADED Pro settings page)
Please take inspiration from this readme.txt

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

The principal PHP file in "Watermark RELOADED" v. 1.3.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("watermark-reloaded.php" instead of "watermark-loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected5,045 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript67966603,790
PHP2140225653
CSS3112419
HTML110183

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity36.50
▷ Minimum class complexity26.00
▷ Maximum class complexity47.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods1450.00%
▷ Protected methods13.57%
▷ Private methods1346.43%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
23 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jQueryPlugins/colorpicker/images/custom_submit.png0.97KB0.99KB0.00%
jQueryPlugins/colorpicker/images/colorpicker_background.png1.85KB2.14KB0.00%
jQueryPlugins/colorpicker/images/custom_hex.png0.55KB0.39KB▼ 28.11%
jQueryPlugins/colorpicker/images/custom_hsb_s.png1.14KB0.89KB▼ 21.75%
jQueryPlugins/colorpicker/images/custom_hsb_h.png0.95KB0.73KB▼ 23.40%