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 successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.11MB] [CPU: ▼2.54ms] Passed 4 tests
This is a short check of server-side resources used by WPWaterMark 轻水印插件
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.07 | 37.45 ▼10.38 |
Dashboard /wp-admin | 3.43 ▲0.12 | 50.69 ▲0.21 |
Posts /wp-admin/edit.php | 3.48 ▲0.12 | 49.96 ▼0.16 |
Add New Post /wp-admin/post-new.php | 6.03 ▲0.14 | 92.35 ▲0.18 |
Media Library /wp-admin/upload.php | 3.35 ▲0.12 | 38.84 ▲1.39 |
轻水印插件设置 /wp-admin/tools.php?page=wpwatermark/index.php | 3.33 | 33.32 |
Server storage [IO: ▲5.01MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
wpwatermark_options |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WPWaterMark 轻水印插件
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,831 ▲85 | 14.80 ▲0.43 | 2.11 ▲0.24 | 42.96 ▼3.81 |
Dashboard /wp-admin | 2,212 ▲24 | 4.82 ▼0.06 | 107.01 ▼7.82 | 46.18 ▲2.79 |
Posts /wp-admin/edit.php | 2,095 ▲9 | 2.05 ▲0.04 | 36.11 ▼1.66 | 38.54 ▲1.31 |
Add New Post /wp-admin/post-new.php | 1,537 ▲23 | 23.16 ▲5.62 | 665.16 ▼24.63 | 54.66 ▼3.81 |
Media Library /wp-admin/upload.php | 1,397 ▲12 | 4.24 ▲0.04 | 96.07 ▼22.12 | 45.75 ▼1.16 |
轻水印插件设置 /wp-admin/tools.php?page=wpwatermark/index.php | 1,554 | 2.04 | 43.47 | 109.49 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wpwatermark/index.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: wpwatermark, wordpress
wpwatermark/index.php 85% from 13 tests
Analyzing the main PHP file in "WPWaterMark 轻水印插件" version 4.2
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpwatermark.php" instead of "index.php")
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 186 characters long)
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,207 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 35 | 15 | 838 |
SVG | 1 | 356 | 3 | 195 |
JavaScript | 7 | 0 | 13 | 168 |
CSS | 6 | 0 | 4 | 6 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 12 | |
▷ Named functions | 12 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.14MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
layui/images/qrcode.png | 72.54KB | 12.37KB | ▼ 82.94% |
layui/images/footer_logo.png | 24.74KB | 0.87KB | ▼ 96.48% |
layui/css/modules/layer/default/icon-ext.png | 5.77KB | 2.91KB | ▼ 49.62% |
layui/css/modules/layer/default/icon.png | 11.22KB | 4.36KB | ▼ 61.19% |
layui/images/logo.png | 25.43KB | 0.87KB | ▼ 96.58% |