Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲1.94MB] [CPU: ▲10.65ms] Passed 4 tests
A check of server-side resources used by REST API TO MiniProgram
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.20 ▲1.74 | 47.99 ▲8.57 |
Dashboard /wp-admin | 5.33 ▲2.02 | 55.59 ▲2.15 |
Posts /wp-admin/edit.php | 5.32 ▲1.96 | 2,177.86 ▲2,130.97 |
Add New Post /wp-admin/post-new.php | 8.17 ▲2.29 | 104.22 ▲13.48 |
Media Library /wp-admin/upload.php | 5.26 ▲2.04 | 52.81 ▲18.38 |
基础设置 /wp-admin/admin.php?page=weixinapp_slug | 4.98 | 37.95 |
Validation /wp-admin/admin.php?page=minapper_validation_page | 5.12 | 42.70 |
扩展设置 /wp-admin/admin.php?page=minapper_expand_settings_page | 4.98 | 38.10 |
Server storage [IO: ▲5.37MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 162 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
A check of browser resources used by REST API TO MiniProgram
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲57 | 14.37 ▼0.36 | 1.65 ▼0.15 | 44.04 ▼0.27 |
Dashboard /wp-admin | 2,221 ▲41 | 5.56 ▼0.10 | 83.08 ▼8.50 | 52.32 ▲9.88 |
Posts /wp-admin/edit.php | 2,161 ▲61 | 1.98 ▼0.00 | 38.83 ▼0.27 | 48.95 ▲7.86 |
Add New Post /wp-admin/post-new.php | 1,550 ▲24 | 22.89 ▼0.11 | 643.72 ▲28.17 | 74.61 ▲13.46 |
Media Library /wp-admin/upload.php | 1,432 ▲35 | 4.22 ▼0.02 | 96.37 ▼3.10 | 49.28 ▲4.43 |
基础设置 /wp-admin/admin.php?page=weixinapp_slug | 901 | 2.00 | 28.63 | 83.03 |
Validation /wp-admin/admin.php?page=minapper_validation_page | 904 | 2.00 | 25.77 | 52.98 |
扩展设置 /wp-admin/admin.php?page=minapper_expand_settings_page | 904 | 2.02 | 24.92 | 53.07 |
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
The following items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 75% 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 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
Almost there! Just fix the following items
- 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'RAM_WxPayNotifyReply' not found in wp-content/plugins/rest-api-to-miniprogram/includes/wxpay/WxPay.Notify.php:8
- > PHP Warning
Use of undefined constant REST_API_TO_MINIPROGRAM_PLUGIN_DIR - assumed 'REST_API_TO_MINIPROGRAM_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/rest-api-to-miniprogram/includes/wxpay/WxPay.JsApiPay.php on line 2
- > PHP Warning
require_once(REST_API_TO_MINIPROGRAM_PLUGIN_DIRincludes/wxpay/WxPay.Data.php): failed to open stream: No such file or directory in wp-content/plugins/rest-api-to-miniprogram/includes/wxpay/WxPay.Api.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rest-api-to-miniprogram/includes/filter/ram-custom-category.php:76
- > PHP Warning
Use of undefined constant REST_API_TO_MINIPROGRAM_PLUGIN_DIR - assumed 'REST_API_TO_MINIPROGRAM_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/rest-api-to-miniprogram/includes/wxpay/WxPay.Api.php on line 4
- > PHP Warning
Use of undefined constant REST_API_TO_MINIPROGRAM_PLUGIN_DIR - assumed 'REST_API_TO_MINIPROGRAM_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/rest-api-to-miniprogram/includes/wxpay/WxPay.Data.php on line 5
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rest-api-to-miniprogram/rest-api-to-miniprogram.php:14
- > PHP Warning
require_once(REST_API_TO_MINIPROGRAM_PLUGIN_DIRincludes/wxpay/WxPay.Config.php): failed to open stream: No such file or directory in wp-content/plugins/rest-api-to-miniprogram/includes/wxpay/WxPay.Data.php on line 5
- > PHP Warning
require_once(REST_API_TO_MINIPROGRAM_PLUGIN_DIRincludes/wxpay/WxPay.Api.php): failed to open stream: No such file or directory in wp-content/plugins/rest-api-to-miniprogram/includes/wxpay/WxPay.JsApiPay.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'REST_API_TO_MINIPROGRAM_PLUGIN_DIRincludes/wxpay/WxPay.Config.php' (include_path='.:/usr/share/php') in wp-content/plugins/rest-api-to-miniprogram/includes/wxpay/WxPay.Data.php on line 5
- > 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 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: No descriptions were found for these screenshots #4, #5, #6, #7, #8, #9 in rest-api-to-miniprogram/assets to your readme.txt
rest-api-to-miniprogram/rest-api-to-miniprogram.php Passed 13 tests
The main PHP file in "REST API TO MiniProgram" ver. 4.6.8.1 adds more information about the plugin and also serves as the entry point for this plugin
63 characters long description:
为微慕小程序提供定制化WordPress REST API json 输出
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin41,016 lines of code in 122 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 1 | 0 | 0 | 15,622 |
PHP | 71 | 3,578 | 3,871 | 12,266 |
CSS | 12 | 63 | 299 | 5,524 |
JavaScript | 37 | 1,209 | 8,631 | 4,933 |
SVG | 1 | 0 | 0 | 2,671 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 20.99 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 368.00 |
Average method complexity | 3.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 63.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 72 | |
▷ Abstract classes | 1 | 1.39% |
▷ Concrete classes | 71 | 98.61% |
▷ Final classes | 0 | 0.00% |
Methods | 670 | |
▷ Static methods | 51 | 7.61% |
▷ Public methods | 628 | 93.73% |
▷ Protected methods | 32 | 4.78% |
▷ Private methods | 10 | 1.49% |
Functions | 74 | |
▷ Named functions | 72 | 97.30% |
▷ Anonymous functions | 2 | 2.70% |
Constants | 6 | |
▷ Global constants | 2 | 33.33% |
▷ Class constants | 4 | 66.67% |
▷ Public constants | 4 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
22 compressed PNG files occupy 1.35MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/admin/exopite-simple-options/assets/jquery.minicolors.png | 67.02KB | 34.31KB | ▼ 48.80% |
includes/admin/exopite-simple-options/assets/images/ui-bg_glass_75_dadada_1x400.png | 0.11KB | 0.16KB | 0.00% |
includes/admin/exopite-simple-options/assets/images/ui-icons_222222_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
includes/admin/exopite-simple-options/assets/images/ui-icons_ffffff_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
includes/admin/exopite-simple-options/assets/chosen-sprite.png | 0.53KB | 0.88KB | 0.00% |