Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
- Install procedure had errors
- > Error in wp-content/plugins/xunhu-wechat-payment-for-easy-digital-downloads/class-xh-new-wechat-edd-api.php+53
Uncaught Error: Call to undefined function edd_get_option() in wp-content/plugins/xunhu-wechat-payment-for-easy-digital-downloads/class-xh-new-wechat-edd-api.php:53
Stack trace:
#0 wp-includes/class-wp-hook.php(310): XH_New_Wechat_Payment_EDD_Api->register_activation_hook()
#1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(517): WP_Hook->do_action()
#3 wp-admin/includes/plugin.php(693): do_action()
Server metrics [RAM: ▲0.00MB] [CPU: ▼5.88ms] Passed 4 tests
A check of server-side resources used by Easy Digital Downloads微信支付个人版
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 46.87 ▲7.26 |
Dashboard /wp-admin | 3.31 ▲0.00 | 44.23 ▼4.20 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 47.09 ▼1.98 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 81.16 ▼14.45 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 30.41 ▼2.87 |
Server storage [IO: ▲0.17MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Easy Digital Downloads微信支付个人版
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲29 | 13.21 ▼1.47 | 4.61 ▲2.71 | 42.50 ▼1.52 |
Dashboard /wp-admin | 2,203 ▲21 | 5.76 ▲0.89 | 99.19 ▼3.82 | 38.33 ▼5.07 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.02 ▼0.04 | 39.58 ▼0.91 | 34.57 ▼2.53 |
Add New Post /wp-admin/post-new.php | 1,528 ▲9 | 23.20 ▼0.08 | 638.65 ▲45.42 | 49.80 ▼9.62 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.19 ▼0.01 | 91.76 ▼6.96 | 39.62 ▼4.52 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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
Please fix the following items
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/xunhu-wechat-payment-for-easy-digital-downloads/views/query.php
- 6× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Notice
Trying to get property 'mchid' of non-object in wp-content/plugins/xunhu-wechat-payment-for-easy-digital-downloads/views/query.php on line 5
- > PHP Notice
Undefined index: data in wp-content/plugins/xunhu-wechat-payment-for-easy-digital-downloads/views/query.php on line 3
- > PHP Notice
Undefined index: status in wp-content/plugins/xunhu-wechat-payment-for-easy-digital-downloads/views/query.php on line 14
- > PHP Notice
Trying to get property 'out_trade_no' of non-object in wp-content/plugins/xunhu-wechat-payment-for-easy-digital-downloads/views/query.php on line 6
- > PHP Notice
Trying to get property 'hashkey' of non-object in wp-content/plugins/xunhu-wechat-payment-for-easy-digital-downloads/views/query.php on line 10
- > PHP Notice
Undefined variable: order_id in wp-content/plugins/xunhu-wechat-payment-for-easy-digital-downloads/views/query.php on line 18
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: wechat payments, wordpress plugin, payments, easy digital downloads, wechatpay...
xunhu-wechat-payment-for-easy-digital-downloads/init.php 85% from 13 tests
The main PHP script in "Easy Digital Downloads微信支付个人版" version 1.0.3 is automatically included on every request by WordPress
You should first fix the following items:
- Text Domain: Please use dashes and lowercase characters for text domains
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("xunhu-wechat-payment-for-easy-digital-downloads.php" instead of "init.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
Good job! No executable or dangerous file extensions detected1,697 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 139 | 57 | 914 |
JavaScript | 1 | 79 | 129 | 722 |
PO File | 1 | 175 | 392 | 61 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 40.67 |
▷ Minimum class complexity | 32.00 |
▷ Maximum class complexity | 52.00 |
Average method complexity | 3.61 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.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 | 40 | |
▷ Static methods | 7 | 17.50% |
▷ Public methods | 38 | 95.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 5.00% |
Functions | 2 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 2 | 100.00% |
Constants | 5 | |
▷ Global constants | 5 | 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
3 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/wechat/logo.png | 3.09KB | 2.47KB | ▼ 20.10% |
images/icon.png | 3.09KB | 2.47KB | ▼ 20.10% |
images/wechat/wechat-sys.png | 52.95KB | 19.77KB | ▼ 62.67% |