Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
- The plugin cannot be installed
- > Notice in wp-content/plugins/watermark-hotlink-protection/watermark-hotlink-protection-loader.php+43
Undefined index: action
Server metrics [RAM: ▼0.62MB] [CPU: ▼32.51ms] Passed 4 tests
An overview of server-side resources used by Watermark Hotlink Protection
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.92 ▲0.45 | 42.80 ▲0.03 |
Dashboard /wp-admin | 3.32 ▲0.02 | 27.80 ▼25.84 |
Posts /wp-admin/edit.php | 3.32 ▼0.03 | 29.58 ▼25.36 |
Add New Post /wp-admin/post-new.php | 3.32 ▼2.56 | 31.04 ▼64.40 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 24.68 ▼14.43 |
Watermark Hotlink Protection /wp-admin/options-general.php?page=watermark-hotlink-protection-settings | 3.32 | 28.09 |
Server storage [IO: ▲3.35MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Watermark Hotlink Protection
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,829 ▲83 | 13.25 ▼1.34 | 2.15 ▲0.27 | 42.72 ▼3.16 |
Dashboard /wp-admin | 2,213 ▲22 | 4.85 ▼0.25 | 112.27 ▲6.06 | 42.28 ▼0.08 |
Posts /wp-admin/edit.php | 2,096 ▲4 | 2.00 ▲0.02 | 40.45 ▼1.58 | 34.80 ▼3.57 |
Add New Post /wp-admin/post-new.php | 1,517 ▼16 | 17.44 ▼5.80 | 659.43 ▼14.97 | 49.76 ▼2.38 |
Media Library /wp-admin/upload.php | 1,392 ▲7 | 4.18 ▼0.02 | 99.45 ▼2.78 | 43.95 ▲1.02 |
Watermark Hotlink Protection /wp-admin/options-general.php?page=watermark-hotlink-protection-settings | 1,396 | 4.88 | 127.94 | 44.54 |
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
These items require your attention
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/watermark-hotlink-protection/watermark-hotlink-protection-plugin.php+104
Trying to access array offset on value of type bool
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=watermark-hotlink-protection-settings
- > Notice in wp-content/plugins/watermark-hotlink-protection/watermark-hotlink-protection-plugin.php+104
Trying to access array offset on value of type bool
- > GET request to /wp-admin/options-general.php?page=watermark-hotlink-protection-settings
- > Notice in wp-content/plugins/watermark-hotlink-protection/watermark-hotlink-protection-plugin.php+104
Trying to access array offset on value of type null
SRP 50% 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 take a closer look at the following
- 4× PHP files trigger server errors when accessed directly:
- > PHP Warning
require_once(ABSPATH/wp-admin/includes/admin.php): failed to open stream: No such file or directory in wp-content/plugins/watermark-hotlink-protection/watermark-hotlink-protection-plugin-installer.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/watermark-hotlink-protection/watermark-hotlink-protection-loader.php:11
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATH/wp-admin/includes/admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/watermark-hotlink-protection/watermark-hotlink-protection-plugin-installer.php on line 7
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/watermark-hotlink-protection/watermark-hotlink-protection-plugin-installer.php on line 7
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% 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:
- Screenshots: Add images for these screenshots: #1 (General Watermark Settings Page), #2 (Image Watermark Settings Page), #3 (Text Watermark Settings Page), #4 (Watermark Preview Page)
- Tags: You are using too many tags: 17 tag instead of maximum 10
watermark-hotlink-protection/watermark-hotlink-protection-loader.php 92% from 13 tests
The main PHP script in "Watermark Hotlink Protection" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("watermark-hotlink-protection.php" instead of "watermark-hotlink-protection-loader.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,401 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 880 | 295 | 1,401 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 39.50 |
▷ Minimum class complexity | 29.00 |
▷ Maximum class complexity | 46.00 |
Average method complexity | 3.23 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 69 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 52 | 75.36% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 17 | 24.64% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
watermark-logo.png | 56.70KB | 28.29KB | ▼ 50.10% |