10% bulk-watermark

Code Review | Bulk Watermark

WordPress plugin Bulk Watermark scored10%from 54 tests.

About plugin

  • Plugin page: bulk-watermark
  • Plugin version: 1.6.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2012
  • Latest release: Feb 15, 2015
  • Number of updates: 55
  • Update frequency: every 16.1 days
  • Top authors: ChrisHurst (92.73%)MyWebsiteAdvisor (9.09%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /21,892 total downloads

Benchmarks

Plugin footprint 58% 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
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/bulk-watermark/bulk-watermark-loader.php+25
    Undefined index: action

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.28ms] Passed 4 tests

An overview of server-side resources used by Bulk Watermark
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1538.84 ▼5.25
Dashboard /wp-admin3.34 ▲0.0451.07 ▼4.01
Posts /wp-admin/edit.php3.45 ▲0.1053.68 ▲3.13
Add New Post /wp-admin/post-new.php5.92 ▲0.0498.84 ▼10.74
Media Library /wp-admin/upload.php3.26 ▲0.0438.32 ▲2.90
Bulk Watermark /wp-admin/options-general.php?page=bulk-watermark-settings3.2439.29

Server storage [IO: ▲5.47MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Bulk Watermark
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.22 ▼1.156.12 ▲4.2140.51 ▼4.82
Dashboard /wp-admin2,210 ▲224.87 ▼0.08111.54 ▼7.2840.05 ▼5.16
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0039.17 ▲1.7133.82 ▼3.16
Add New Post /wp-admin/post-new.php1,545 ▲3118.74 ▲1.24626.14 ▼59.9853.70 ▼7.12
Media Library /wp-admin/upload.php1,392 ▲14.16 ▼0.0296.07 ▼0.7342.77 ▼4.18
Bulk Watermark /wp-admin/options-general.php?page=bulk-watermark-settings1,84211.17377.1459.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/admin.php): failed to open stream: No such file or directory in wp-content/plugins/bulk-watermark/bulk-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/bulk-watermark/bulk-watermark-plugin-installer.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bulk-watermark/bulk-watermark-loader.php:11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bulk-watermark/bulk-watermark-plugin-installer.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots require images: #1 (General Settings), #2 (Text Watermark Settings), #3 (Image Watermark Settings), #4 (Watermark Settings Preview), #5 (Select Images to Watermark with Image Preview Popup), #6 (Finished Example Image)
You can look at the official readme.txt

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

This is the main PHP file of "Bulk Watermark" version 1.6.10, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 ("bulk-watermark.php" instead of "bulk-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
There were no executable files found in this plugin1,548 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP58382971,525
JavaScript15423

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity38.00
▷ Minimum class complexity24.00
▷ Maximum class complexity46.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods5779.17%
▷ Protected methods00.00%
▷ Private methods1520.83%
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.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
watermark-logo.png49.83KB23.65KB▼ 52.54%