93% ips-watermark

Code Review | htaccess Watermark

WordPress plugin htaccess Watermark scored 93% from 54 tests.

About plugin

  • Plugin page: ips-watermark
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 5.8.1
  • First release: Jun 1, 2014
  • Latest release: Jun 1, 2014
  • Number of updates: 13
  • Update frequency: N/A
  • Top authors: ip4368 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,464 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by htaccess Watermark
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1433.99 ▲10.10
Dashboard /wp-admin3.08 ▲0.0351.13 ▲4.08
Posts /wp-admin/edit.php3.13 ▲0.0245.86 ▲0.56
Add New Post /wp-admin/post-new.php5.44 ▲0.0087.59 ▼586.96
Media Library /wp-admin/upload.php3.02 ▲0.0235.90 ▼2.79
Watermark /wp-admin/upload.php?page=ips-watermark/admin-page.php3.0530.79

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • Illegal file modification detected: 1 file (0.11KB) outside of "wp-content/plugins/ips-watermark/" and "wp-content/uploads/"
    • (new file) wp-content/plugins/ips-watermark-data/watermark.png
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for htaccess Watermark
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11216.22 ▲0.759.05 ▲0.7248.04 ▼4.17
Dashboard /wp-admin2,978 ▲415.86 ▼0.10148.75 ▼1.24120.72 ▼1.83
Posts /wp-admin/edit.php2,741 ▲22.69 ▲0.0171.76 ▲3.2088.54 ▼4.94
Add New Post /wp-admin/post-new.php1,686 ▲318.68 ▼0.07402.95 ▲6.20105.70 ▼11.31
Media Library /wp-admin/upload.php1,812 ▲55.06 ▲0.04151.46 ▼14.21121.82 ▲3.03
Watermark /wp-admin/upload.php?page=ips-watermark/admin-page.php1,2412.1059.7592.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 25× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined index: imageRequested in wp-content/plugins/ips-watermark/watermark.php on line 25
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ips-watermark/htaccess.php on line 45
    • > PHP Notice
      Undefined variable: acw_uploads in wp-content/plugins/ips-watermark/htaccess.php on line 40
    • > PHP Notice
      Undefined variable: acw_uploads in wp-content/plugins/ips-watermark/htaccess.php on line 45
    • > PHP Notice
      Undefined variable: acw_relativePaths in wp-content/plugins/ips-watermark/htaccess.php on line 56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/ips-watermark/paths.php:5
    • > PHP Notice
      Undefined index: imageRequested in wp-content/plugins/ips-watermark/watermark.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ips-watermark/htaccess.php on line 40
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ips-watermark/htaccess.php on line 59
    • > PHP Notice
      Undefined index: imageRequested in wp-content/plugins/ips-watermark/watermark.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can look at the official readme.txt

ips-watermark/index.php 85% from 13 tests

The main PHP script in "htaccess Watermark" version 0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("ips-watermark.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected536 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP67847489
CSS11047

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected