78% next-watermark

Code Review | Next Watermark

WordPress plugin Next Watermark scored78%from 54 tests.

About plugin

  • Plugin page: next-watermark
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Jun 2, 2022
  • Latest release: Oct 26, 2023
  • Number of updates: 60
  • Update frequency: every 8.5 days
  • Top authors: nxtweb (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /2,860 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.22ms] Passed 4 tests

An overview of server-side resources used by Next Watermark
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1238.92 ▲2.33
Dashboard /wp-admin3.37 ▲0.0633.27 ▼12.48
Posts /wp-admin/edit.php3.44 ▲0.0845.11 ▼2.07
Add New Post /wp-admin/post-new.php5.60 ▼0.2970.65 ▼19.80
Media Library /wp-admin/upload.php3.36 ▲0.1334.24 ▲1.46
Watermark Image /wp-admin/admin.php?page=nwm-acp&tab=wm_image3.7846.85
Watermark Text /wp-admin/admin.php?page=nwm-acp&tab=wm_text3.7846.64
Backup/Restore /wp-admin/admin.php?page=nwm-acp&tab=wm_media3.7845.40
Next Watermark /wp-admin/admin.php?page=nwm-acp3.7849.31
General Settings /wp-admin/admin.php?page=nwm-acp&tab=wm_settings3.7846.62

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
nwmCurrentType
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
nwmCurrentVersion

Browser metrics Passed 4 tests

This is an overview of browser requirements for Next Watermark
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲20714.70 ▲0.411.71 ▼0.1441.06 ▼1.31
Dashboard /wp-admin2,359 ▲1826.18 ▲0.53109.81 ▲22.2781.82 ▲42.02
Posts /wp-admin/edit.php2,302 ▲2023.41 ▲1.3352.00 ▲18.0763.56 ▲24.61
Add New Post /wp-admin/post-new.php1,563 ▲3723.11 ▼0.63629.92 ▼60.5036.76 ▼10.96
Media Library /wp-admin/upload.php1,445 ▲484.18 ▼0.0382.97 ▼29.5183.20 ▲34.91
Watermark Image /wp-admin/admin.php?page=nwm-acp&tab=wm_image1,3223.2840.3193.56
Watermark Text /wp-admin/admin.php?page=nwm-acp&tab=wm_text1,3563.2340.8062.92
Backup/Restore /wp-admin/admin.php?page=nwm-acp&tab=wm_media1,1033.2940.9971.96
Next Watermark /wp-admin/admin.php?page=nwm-acp1,2213.2742.4672.76
General Settings /wp-admin/admin.php?page=nwm-acp&tab=wm_settings1,2213.1942.1373.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • nwmCurrentType
    • nwmCurrentVersion
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/next-watermark/next-watermark.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/next-watermark/includes/nwm-acp-page.php:169
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/next-watermark/includes/nwm-functions.php:55

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=nwm-acp&tab=wm_text
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'value')" "TypeError: Cannot read properties of null (reading 'value')\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=nwm-acp&tab=wm_text:226:78)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=nwm-acp&tab=wm_text
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'value')

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Requires php: The plugin version is formatted incorrectly
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

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

The primary PHP file in "Next Watermark" version 1.7 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 171 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,818 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4181161,500
PO File1105109222
CSS13069
JavaScript15127

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.22KB1.30KB0.00%