Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼0.00MB] [CPU: ▼8.54ms] Passed 4 tests
This is a short check of server-side resources used by WordPress WooCommerce微信支付个人版
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 36.13 ▼3.82 |
Dashboard /wp-admin | 3.31 ▼0.03 | 44.50 ▼14.78 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 45.70 ▼4.19 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 85.79 ▼11.37 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 36.79 ▲3.11 |
Server storage [IO: ▲0.23MB] [DB: ▲0.00MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
- Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/xunhu-wechat-payment-for-woocommerce/" and "wp-content/uploads/"
- (new file) "wp-content/plugins/xunhu-wechat-payment-for-woocommerce/\344\275\277\347\224\250\350\257\264\346\230\216.txt"
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WordPress WooCommerce微信支付个人版
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.22 ▼1.14 | 1.50 ▼0.14 | 37.61 ▼2.62 |
Dashboard /wp-admin | 2,206 ▲18 | 5.81 ▲0.93 | 100.57 ▼14.24 | 37.88 ▼3.92 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.02 ▼0.03 | 38.20 ▲3.11 | 33.52 ▼3.70 |
Add New Post /wp-admin/post-new.php | 1,533 ▲19 | 23.24 ▲5.75 | 682.60 ▲18.07 | 53.24 ▼4.86 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.16 ▼0.21 | 93.27 ▼1.68 | 41.61 ▲0.05 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/xunhu-wechat-payment-for-woocommerce/views/notify.php
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Class 'XH_Wechat_Payment_WC_Payment_Gateway' not found in wp-content/plugins/xunhu-wechat-payment-for-woocommerce/h5.php:6
- > PHP Fatal error
Uncaught Error: Class 'XH_Wechat_Payment_WC_Payment_Gateway' not found in wp-content/plugins/xunhu-wechat-payment-for-woocommerce/views/query.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
- Screenshots: Add images for these screenshots: #4 (Pay screen in wechat), #5 (wechat mobile Screenshots)
xunhu-wechat-payment-for-woocommerce/init.php 85% from 13 tests
The main PHP script in "WordPress WooCommerce微信支付个人版" version 1.0.7 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("xunhu-wechat-payment-for-woocommerce.php" instead of "init.php")
- Text Domain: Please use dashes and lowercase characters for text domains
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,685 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 2 | 79 | 130 | 725 |
PHP | 5 | 55 | 45 | 605 |
CSS | 1 | 26 | 23 | 298 |
PO File | 1 | 17 | 18 | 57 |
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.42 |
Average class complexity | 63.00 |
▷ Minimum class complexity | 63.00 |
▷ Maximum class complexity | 63.00 |
Average method complexity | 4.88 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 16.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 16 | |
▷ Static methods | 2 | 12.50% |
▷ Public methods | 15 | 93.75% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 6.25% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
Constants | 9 | |
▷ Global constants | 9 | 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
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/weixin.png | 3.57KB | 2.02KB | ▼ 43.49% |
images/wechat.png | 3.09KB | 2.47KB | ▼ 20.10% |
images/logo/wechat.png | 3.09KB | 2.47KB | ▼ 20.10% |
images/img_14.png | 3.23KB | 1.85KB | ▼ 42.84% |
images/ep_new_sprites1.png | 2.89KB | 0.20KB | ▼ 92.93% |