Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
- The plugin did not install without errors
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method DX_Watermark::make_dir() should not be called statically
Server metrics [RAM: ▲0.00MB] [CPU: ▼8.88ms] Passed 4 tests
Analyzing server-side resources used by DX-Watermark
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 40.99 ▲1.56 |
Dashboard /wp-admin | 3.32 ▼0.03 | 47.47 ▼15.76 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 47.90 ▼3.62 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 85.82 ▼16.24 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 37.23 ▲0.11 |
daxiawp主题商城 /wp-admin/admin.php?page=daxiawp_theme | 3.20 | 31.38 |
DX-Watermark /wp-admin/admin.php?page=DX-Watermark | 3.26 | 32.21 |
Server storage [IO: ▲2.74MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for DX-Watermark
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,815 ▲44 | 14.72 ▲0.51 | 1.64 ▼0.16 | 41.17 ▲0.50 |
Dashboard /wp-admin | 2,224 ▲56 | 5.60 ▼0.07 | 91.34 ▲4.75 | 72.75 ▲29.76 |
Posts /wp-admin/edit.php | 2,123 ▲18 | 1.99 ▼0.02 | 35.93 ▼8.06 | 40.22 ▲1.53 |
Add New Post /wp-admin/post-new.php | 1,568 ▲42 | 23.14 ▼0.09 | 767.23 ▲90.41 | 55.66 ▼1.19 |
Media Library /wp-admin/upload.php | 1,420 ▲20 | 4.28 ▲0.14 | 101.96 ▼13.74 | 78.51 ▲28.59 |
daxiawp主题商城 /wp-admin/admin.php?page=daxiawp_theme | 1,054 | 4.34 | 122.66 | 58.55 |
DX-Watermark /wp-admin/admin.php?page=DX-Watermark | 1,118 | 1.95 | 38.16 | 36.28 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
- 38 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=DX-Watermark
- > Notice in wp-content/plugins/dx-watermark/preview.php+60
Trying to access array offset on value of type bool
- > GET request to /wp-admin/admin.php?page=DX-Watermark
- > Notice in wp-content/plugins/dx-watermark/dx-watermark.php+280
Undefined variable: fonts
- > GET request to /wp-admin/admin.php?page=DX-Watermark
- > Warning in wp-content/plugins/dx-watermark/preview.php+66
Declaration of DX_Watermark_Preview::make_image($im) should be compatible with DX_Watermark::make_image($im, $mime, $im_file)
- > GET request to /wp-admin/admin.php?page=DX-Watermark
- > Warning in wp-content/plugins/dx-watermark/preview.php+9
Declaration of DX_Watermark_Preview::do_watermark() should be compatible with DX_Watermark::do_watermark($metadata)
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/dx-watermark/preview.php
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/dx-watermark/options-form.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dx-watermark/theme.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/dx-watermark/dx-watermark.php:420
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=daxiawp_theme
- > Javascript (warning) in unknown
http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/vcrm?di=454435&uuid=aaa4f8c7c59f6a24&dri=0&dis=0&dai=0&ps=204x64&enu=encoding&exps=110011&ant=0&psi=9f5b15fb23d0c2c2&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697611631565&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=daxiawp%E4%B8%BB%E9%A2%98&dbv=2&drs=1&pcs=800x585&pss=1038x585&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697611631&prot=2&rw=600<u=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697611632, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=daxiawp_theme
- > Javascript (warning) in unknown
http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/vcrm?di=454451&uuid=610c29b5601ba847&dri=0&dis=0&dai=0&ps=204x386&enu=encoding&exps=110011&ant=0&psi=9f5b15fb23d0c2c2&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697611631565&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454435%22)%3B&dbv=2&drs=1&pcs=800x585&pss=1038x585&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697611632&prot=2&rw=600<u=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697611633, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=daxiawp_theme
- > Javascript (warning) in unknown
http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/vcrm?di=454453&uuid=25e5da6559766eef&dri=0&dis=0&dai=0&ps=204x708&enu=encoding&exps=110011&ant=0&psi=9f5b15fb23d0c2c2&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697611631565&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454451%22)%3B&dbv=2&drs=1&pcs=800x585&pss=1038x585&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697611633&prot=2&rw=600<u=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697611633, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=daxiawp_theme
- > Javascript (warning) in unknown
http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/vcrm?di=454454&uuid=a1decc249970f497&dri=0&dis=0&dai=0&ps=456x64&enu=encoding&exps=110011&ant=0&psi=9f5b15fb23d0c2c2&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697611631565&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454453%22)%3B&dbv=2&drs=1&pcs=800x585&pss=1038x585&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697611633&prot=2&rw=600<u=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697611634, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=daxiawp_theme
- > Javascript (warning) in unknown
http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/vcrm?di=454455&uuid=aa46deab3adc4a6f&dri=0&dis=0&dai=0&ps=456x386&enu=encoding&exps=110011&ant=0&psi=9f5b15fb23d0c2c2&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697611631565&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454454%22)%3B&dbv=2&drs=1&pcs=785x585&pss=1038x768&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697611633&prot=2&rw=600<u=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697611634, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=daxiawp_theme
- > Javascript (warning) in unknown
http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/vcrm?di=454457&uuid=b9daaee54250107c&dri=0&dis=0&dai=0&ps=456x708&enu=encoding&exps=110011&ant=0&psi=9f5b15fb23d0c2c2&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697611631565&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454455%22)%3B&dbv=2&drs=1&pcs=785x585&pss=1038x768&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697611634&prot=2&rw=600<u=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697611634, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=daxiawp_theme
- > Javascript (warning) in unknown
http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/vcrm?di=454459&uuid=262072b9bf113594&dri=0&dis=0&dai=0&ps=708x64&enu=encoding&exps=110011&ant=0&psi=9f5b15fb23d0c2c2&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697611631565&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454457%22)%3B&dbv=2&drs=1&pcs=785x585&pss=1038x795&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697611634&prot=2&rw=600<u=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697611634, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=daxiawp_theme
- > Javascript (warning) in unknown
http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/vcrm?di=454461&uuid=470de7d7478d1fac&dri=0&dis=0&dai=0&ps=708x386&enu=encoding&exps=110011&ant=0&psi=9f5b15fb23d0c2c2&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697611631565&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454459%22)%3B&dbv=2&drs=1&pcs=785x585&pss=1038x1020&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697611634&prot=2&rw=600<u=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697611635, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=daxiawp_theme
- > Javascript (warning) in unknown
http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/vcrm?di=454462&uuid=d041cec4bd48df31&dri=0&dis=0&dai=0&ps=708x708&enu=encoding&exps=110011&ant=0&psi=9f5b15fb23d0c2c2&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697611631565&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454461%22)%3B&dbv=2&drs=1&pcs=785x585&pss=1038x1020&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697611634&prot=2&rw=600<u=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697611635, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
- Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line (
=== dx-watermark ===
)
dx-watermark/dx-watermark.php Passed 13 tests
This is the main PHP file of "DX-Watermark" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
69 characters long description:
The pictures automatically add watermark. 图片自动添加水印。
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
Success! There were no dangerous files found in this plugin617 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 63 | 58 | 545 |
PO File | 1 | 26 | 26 | 71 |
JavaScript | 1 | 1 | 11 | 1 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 42.50 |
▷ Minimum class complexity | 18.00 |
▷ Maximum class complexity | 67.00 |
Average method complexity | 4.32 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 15.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 25 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 25 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
icon.png | 0.75KB | 0.98KB | 0.00% |
excolor/ok.png | 3.56KB | 0.68KB | ▼ 80.87% |
excolor/hue.png | 8.55KB | 6.41KB | ▼ 24.95% |
excolor/bg.png | 13.52KB | 7.09KB | ▼ 47.60% |
excolor/shbg.png | 1.40KB | 2.59KB | 0.00% |