Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
- Install procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/alipay-donate/alipay-donate.php+52
Function create_function() is deprecated
Server metrics [RAM: ▼1.94MB] [CPU: ▼55.98ms] Passed 4 tests
Server-side resources used by AlipayDonate
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.09 ▼1.41 | 4.96 ▼35.57 |
Dashboard /wp-admin | 2.11 ▼1.23 | 11.26 ▼41.10 |
Posts /wp-admin/edit.php | 2.11 ▼1.29 | 8.67 ▼47.09 |
Add New Post /wp-admin/post-new.php | 2.11 ▼3.82 | 6.74 ▼100.17 |
Media Library /wp-admin/upload.php | 2.11 ▼1.16 | 6.44 ▼32.48 |
AlipayDonate /wp-admin/options-general.php?page=ws_alido_settings_page | 2.11 | 7.11 |
Server storage [IO: ▲0.17MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 8 new options
New WordPress options |
---|
ws_alipay_donate_options |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
widget_ws_alido |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for AlipayDonate
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.37 ▼0.03 | 1.92 ▼0.01 | 42.41 ▼0.85 |
Dashboard /wp-admin | 2,199 ▲22 | 5.62 ▲0.07 | 93.51 ▲4.44 | 41.31 ▼6.65 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.02 ▼0.01 | 38.49 ▲1.66 | 35.22 ▼4.98 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.71 ▲0.57 | 628.34 ▼77.74 | 50.41 ▼6.51 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.23 ▲0.06 | 98.25 ▼7.11 | 41.31 ▼4.97 |
AlipayDonate /wp-admin/options-general.php?page=ws_alido_settings_page | 1,183 | 2.02 | 24.43 | 76.08 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- Uninstall procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/alipay-donate/alipay-donate.php+52
Function create_function() is deprecated
- This plugin does not fully uninstall, leaving 8 options in the database
- ws_alipay_donate_options
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- widget_ws_alido
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 50% 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)
Please fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=ws_alido_settings_page
- > Deprecated in wp-content/plugins/alipay-donate/alipay-donate.php+52
Function create_function() is deprecated
- > GET request to /wp-admin/options-general.php?page=ws_alido_settings_page
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in WS_AliDo_Widget is deprecated since version 4.3.0! Use __construct() instead.
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/alipay-donate/includes/cls.widget.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/alipay-donate/includes/tpl.settings.php:3
- > PHP Warning
Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/alipay-donate/includes/cfg.config.php on line 22
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/alipay-donate/includes/cfg.config.php on line 25
- > PHP Warning
Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/alipay-donate/includes/cfg.config.php on line 19
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/alipay-donate/includes/cfg.config.php on line 28
- > PHP Warning
Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/alipay-donate/includes/cfg.config.php on line 22
- > PHP Warning
Use of undefined constant WS_ALIDO_URL - assumed 'WS_ALIDO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/alipay-donate/includes/tpl.settings.php on line 2
- > PHP Warning
Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/alipay-donate/includes/cfg.config.php on line 16
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alipay-donate/includes/cls.settings.php:21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
- Screenshots: These screenshots do not have images: #1 (前台捐赠面板), #2 (后台控制面板)
- Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line (
=== alipay-donate ===
)
alipay-donate/alipay-donate.php Passed 13 tests
The main PHP file in "AlipayDonate" ver. 1.8.8 adds more information about the plugin and also serves as the entry point for this plugin
58 characters long description:
AlipayDonate,支付宝为您提供快捷的捐赠服务.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected521 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 9 | 185 | 62 | 482 |
JavaScript | 1 | 11 | 3 | 23 |
CSS | 2 | 3 | 0 | 16 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 6.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 10.00 |
Average method complexity | 1.73 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 22 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 21 | 95.45% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 4.55% |
Functions | 11 | |
▷ Named functions | 11 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 8 | |
▷ Global constants | 8 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
styles/images/donate_06.png | 4.44KB | 1.27KB | ▼ 71.47% |
screenshot-1.png | 40.93KB | 18.00KB | ▼ 56.02% |
styles/images/donate_05.png | 4.16KB | 0.92KB | ▼ 77.92% |
styles/images/donate_04.png | 4.45KB | 1.23KB | ▼ 72.39% |
styles/images/donate_10.png | 4.09KB | 3.17KB | ▼ 22.44% |