78% awesome-watermark

Code Review | Awesome Watermark

WordPress plugin Awesome Watermark scored 78% from 54 tests.

About plugin

  • Plugin page: awesome-watermark
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 27, 2015
  • Latest release: Jun 28, 2015
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: tahiryasin (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active / 3,487 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.17ms] Passed 4 tests

This is a short check of server-side resources used by Awesome Watermark
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0137.40 ▼6.24
Dashboard /wp-admin3.35 ▲0.0449.45 ▲1.75
Posts /wp-admin/edit.php3.46 ▲0.1045.68 ▲1.23
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.92 ▲3.96
Media Library /wp-admin/upload.php3.27 ▲0.0436.10 ▲4.18
Watermarks /wp-admin/options-general.php?page=awm_options3.2432.40

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
awm_general_settings
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Awesome Watermark: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲1713.22 ▼1.601.66 ▼0.0444.03 ▼0.06
Dashboard /wp-admin2,212 ▲94.87 ▼0.9396.71 ▲2.0239.00 ▲2.64
Posts /wp-admin/edit.php2,095 ▲61.99 ▼0.0335.30 ▼1.9734.25 ▼0.94
Add New Post /wp-admin/post-new.php1,519 ▼1717.63 ▼5.62695.82 ▲58.0756.75 ▲6.05
Media Library /wp-admin/upload.php1,394 ▲64.21 ▲0.0193.36 ▼5.6549.24 ▲4.00
Watermarks /wp-admin/options-general.php?page=awm_options1,2482.3557.4631.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/awesome-watermark/awesome-watermark.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=awm_options
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/awesome-watermark//js/scripts.js?ver=6.3.1:20:31)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&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,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=awm_options
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/options-general.php?page=awm_options
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:2740 Uncaught Error: cannot call methods on slider prior to initialization; attempted to call method 'value'

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

awesome-watermark/awesome-watermark.php Passed 13 tests

The entry point to "Awesome Watermark" version 1.0 is a PHP file that has certain tags in its header comment area
64 characters long description:
Apply text or image watermark to any image and thumbnails sizes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected2,000 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS337551,172
PHP585186741
JavaScript114087

PHP code Passed 2 tests

This is a very shot review 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.27
Average class complexity31.33
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods32
▷ Static methods13.12%
▷ Public methods3093.75%
▷ Protected methods00.00%
▷ Private methods26.25%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin