88% alti-watermark

Code Review | watermark

WordPress plugin watermark scored 88% from 54 tests.

About plugin

  • Plugin page: alti-watermark
  • Plugin version: 0.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 5.8.1
  • First release: Mar 31, 2014
  • Latest release: May 4, 2017
  • Number of updates: 41
  • Update frequency: every 27.6 days
  • Top authors: alticreation (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

1,000+ active / 73,929 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼147.54ms] Passed 4 tests

Analyzing server-side resources used by watermark
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.0925.51 ▲1.74
Dashboard /wp-admin3.15 ▲0.0935.48 ▼6.95
Posts /wp-admin/edit.php3.27 ▲0.1632.60 ▲0.03
Add New Post /wp-admin/post-new.php5.52 ▲0.0872.57 ▼584.99
Media Library /wp-admin/upload.php3.10 ▲0.0926.61 ▲4.00
Watermark /wp-admin/upload.php?page=alti-watermark-settings-page3.1028.95

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

Input-output and database impact of this plugin
Please fix the following
  • The plugin illegally modified 1 file (0.09KB) outside of "wp-content/plugins/alti-watermark/" and "wp-content/uploads/"
    • (new file) wp-content/plugins/alti-watermark-data/watermark.png
Filesystem: 30 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

watermark: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,732 ▲13115.92 ▼0.057.27 ▲2.4573.81 ▼2.35
Dashboard /wp-admin2,944 ▲486.05 ▼0.10115.00 ▼18.31161.18 ▼11.89
Posts /wp-admin/edit.php2,748 ▲83.25 ▲0.0162.99 ▼0.94139.28 ▼1.07
Add New Post /wp-admin/post-new.php2,082 ▼1,62215.68 ▼3.25371.28 ▼61.68159.77 ▲0.96
Media Library /wp-admin/upload.php1,762 ▲105.53 ▲0.06143.92 ▲4.09182.34 ▼2.99
Watermark /wp-admin/upload.php?page=alti-watermark-settings-page1,5442.6858.48201.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/alti-watermark/admin/views/includes/alti-watermark-admin-sidebar.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/alti-watermark/admin/views/alti-watermark-admin-settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/alti-watermark/admin/views/includes/alti-watermark-admin-image-size-label.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Alti_Watermark' not found in wp-content/plugins/alti-watermark/includes/class-alti-watermark-deactivator.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/alti-watermark/admin/views/includes/alti-watermark-admin-message.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Alti_Watermark' not found in wp-content/plugins/alti-watermark/includes/class-alti-watermark-activator.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt is a good inspiration

alti-watermark/alti-watermark.php 92% from 13 tests

This is the main PHP file of "watermark" version 0.3.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 148 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
Everything looks great! No dangerous files found in this plugin1,174 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15198283861
PO File26676245
CSS11157
JavaScript15011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity14.25
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods52
▷ Static methods35.77%
▷ Public methods4586.54%
▷ Protected methods00.00%
▷ Private methods713.46%
Functions2
▷ Named functions2100.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 images were found in this plugin