Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▼1.83MB] [CPU: ▼52.19ms] Passed 4 tests
This is a short check of server-side resources used by Alemha watermarker
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.16 ▼1.30 | 5.95 ▼35.51 |
Dashboard /wp-admin | 2.18 ▼1.12 | 8.41 ▼46.88 |
Posts /wp-admin/edit.php | 2.18 ▼1.17 | 9.06 ▼39.94 |
Add New Post /wp-admin/post-new.php | 2.18 ▼3.71 | 8.27 ▼86.44 |
Media Library /wp-admin/upload.php | 2.18 ▼1.05 | 7.55 ▼31.10 |
Categories /wp-admin/edit-tags.php?taxonomy=Categories&post_type=watermark | 2.18 | 9.40 |
All Watermarks /wp-admin/edit.php?post_type=watermark | 2.18 | 8.40 |
Add New Watermark /wp-admin/post-new.php?post_type=watermark | 2.18 | 7.94 |
Server storage [IO: ▲9.67MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 188 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Alemha watermarker
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,976 ▲190 | 13.60 ▼0.69 | 10.64 ▲8.55 | 43.29 ▲2.12 |
Dashboard /wp-admin | 2,255 ▲78 | 5.79 ▲0.21 | 94.65 ▲2.11 | 41.91 ▼0.46 |
Posts /wp-admin/edit.php | 2,155 ▲55 | 2.39 ▲0.36 | 43.48 ▲6.81 | 33.69 ▼1.29 |
Add New Post /wp-admin/post-new.php | 1,578 ▲41 | 23.78 ▲5.53 | 627.59 ▲4.18 | 34.93 ▼30.95 |
Media Library /wp-admin/upload.php | 1,467 ▲67 | 4.51 ▲0.33 | 100.59 ▲2.82 | 41.63 ▼4.47 |
Categories /wp-admin/edit-tags.php?taxonomy=Categories&post_type=watermark | 1,356 | 2.17 | 33.15 | 48.52 |
All Watermarks /wp-admin/edit.php?post_type=watermark | 1,138 | 2.36 | 40.93 | 31.29 |
Add New Watermark /wp-admin/post-new.php?post_type=watermark | 2,574 | 3.51 | 76.60 | 67.68 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- Uninstall procedure had uncaught errors
- > User notice in wp-includes/functions.php+5905
Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the watermark_ajax handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
- 4 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=watermark
- > User notice in wp-includes/functions.php+5905
Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the watermark_ajax handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 4 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=watermark
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the watermark_ajax handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 4 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=watermark
- > User notice in wp-includes/functions.php+5905
Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the image-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 4 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=watermark
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the image-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=watermark
- > Notice in wp-content/plugins/alemha-watermark/views/background_setting.php+14
Undefined index: label
- 2 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=watermark
- > Notice in wp-content/plugins/alemha-watermark/views/background_setting.php+14
Undefined variable: class
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
- 2× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/alemha-watermark/views/img_upload.php
- > /wp-content/plugins/alemha-watermark/views/position_setting.php
- 20× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/alemha-watermark/views/background_setting.php on line 7
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/alemha-watermark/views/img_upload.php on line 7
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/alemha-watermark/libraries/I18N/Arabic/data/charset/_bug.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/alemha-watermark/views/font_setting.php:54
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/alemha-watermark/helpers/extended_upload.php on line 1
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/alemha-watermark/views/position_setting.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post() in wp-content/plugins/alemha-watermark/controllers/preview_watermark.php:3
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/alemha-watermark/helpers/extended_upload.php on line 1
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/alemha-watermark/libraries/I18N/Arabic/data/charset/_utf8.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/alemha-watermark/views/background_setting.php:38
- > PHP Warning
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
- 3 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=watermark
- > Network (severe)
wp-content/plugins/alemha-watermark/helpers/my-script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/post-new.php?post_type=watermark
- > Network (severe)
wp-content/plugins/alemha-watermark/images/noimage.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: image, photo, media, signature, picture...
alemha-watermark/alemha-watermarker.php 92% from 13 tests
The main PHP script in "Alemha watermarker" version 1.3.1 is automatically included on every request by WordPress
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("alemha-watermark.php" instead of "alemha-watermarker.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin37,628 lines of code in 150 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
HTML | 74 | 2,280 | 0 | 28,271 |
PHP | 42 | 1,133 | 4,844 | 5,253 |
XML | 9 | 52 | 97 | 2,928 |
SVG | 21 | 3 | 1 | 813 |
CSS | 1 | 30 | 2 | 163 |
PO File | 1 | 55 | 69 | 125 |
JavaScript | 2 | 16 | 3 | 75 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 27.12 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 75.00 |
Average method complexity | 4.22 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 59.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 24 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 24 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 195 | |
▷ Static methods | 32 | 16.41% |
▷ Public methods | 153 | 78.46% |
▷ Protected methods | 41 | 21.03% |
▷ Private methods | 1 | 0.51% |
Functions | 34 | |
▷ Named functions | 34 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
7 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
libraries/I18N/Arabic/Docs/media/background.png | 0.23KB | 0.10KB | ▼ 58.82% |
screenshot-2.png | 16.32KB | 8.32KB | ▼ 49.01% |
libraries/I18N/Arabic/Docs/media/empty.png | 0.20KB | 0.09KB | ▼ 53.88% |
screenshot-4.png | 63.76KB | 22.74KB | ▼ 64.34% |
screenshot-3.png | 14.07KB | 7.51KB | ▼ 46.59% |