Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲1.79MB] [CPU: ▲12.26ms] 75% from 4 tests
A check of server-side resources used by Mini Program API
Please fix the following
- CPU: The total CPU usage must kept under 500.00ms (currently 1,131.93ms on /wp-admin/admin.php?page=miniprogram)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.18 ▲1.72 | 61.05 ▲22.16 |
Dashboard /wp-admin | 5.13 ▲1.83 | 65.78 ▲11.64 |
Posts /wp-admin/edit.php | 5.20 ▲1.84 | 65.09 ▲11.81 |
Add New Post /wp-admin/post-new.php | 7.79 ▲1.90 | 102.89 ▲9.98 |
Media Library /wp-admin/upload.php | 4.98 ▲1.75 | 53.10 ▲15.59 |
基本设置 /wp-admin/admin.php?page=miniprogram | 4.98 | 1,131.93 |
使用指南 /wp-admin/admin.php?page=guide | 4.98 | 48.72 |
任务列表 /wp-admin/admin.php?page=task | 4.98 | 51.43 |
订阅统计 /wp-admin/admin.php?page=subscribe | 4.98 | 54.43 |
Server storage [IO: ▲0.45MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 43 new files
Database: 2 new tables, 6 new options
New tables |
---|
wp_applets_subscribe_user |
wp_applets_subscribe_message |
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
Mini Program API: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,059 ▲298 | 15.09 ▲0.68 | 2.35 ▲0.58 | 41.30 ▼7.16 |
Dashboard /wp-admin | 2,465 ▲288 | 6.42 ▲0.77 | 125.39 ▲39.10 | 61.94 ▲19.87 |
Posts /wp-admin/edit.php | 2,305 ▲205 | 3.72 ▲1.74 | 53.59 ▲12.22 | 49.15 ▲12.87 |
Add New Post /wp-admin/post-new.php | 1,626 ▲100 | 23.09 ▼0.52 | 669.15 ▼18.49 | 64.00 ▲5.57 |
Media Library /wp-admin/upload.php | 1,442 ▲45 | 4.29 ▲0.07 | 85.95 ▼17.93 | 59.37 ▲15.80 |
基本设置 /wp-admin/admin.php?page=miniprogram | 1,401 | 3.54 | 50.83 | 71.40 |
使用指南 /wp-admin/admin.php?page=guide | 1,144 | 3.27 | 41.17 | 98.72 |
任务列表 /wp-admin/admin.php?page=task | 1,139 | 3.31 | 40.90 | 50.15 |
订阅统计 /wp-admin/admin.php?page=subscribe | 1,090 | 3.32 | 41.71 | 55.76 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- Zombie tables were found after uninstall: 2 tables
- wp_applets_subscribe_message
- wp_applets_subscribe_user
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% 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
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-mini-program/admin/core/menu.php:21
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-mini-program/admin/options.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-mini-program/wp-mini-program.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function options_nav_menu() in wp-content/plugins/wp-mini-program/admin/core/settings.php:10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: rest api, api
wp-mini-program/wp-mini-program.php 92% from 13 tests
"Mini Program API" version 1.4.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
- Description: The description should be shorter than 140 characters (currently 251 characters long)
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
No dangerous file extensions were detected9,910 lines of code in 36 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 33 | 1,116 | 181 | 8,736 |
JavaScript | 2 | 15 | 24 | 679 |
CSS | 1 | 2 | 19 | 495 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 59.53 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 173.00 |
Average method complexity | 7.62 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 46.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 17 | |
▷ Abstract classes | 1 | 5.88% |
▷ Concrete classes | 16 | 94.12% |
▷ Final classes | 0 | 0.00% |
Methods | 152 | |
▷ Static methods | 11 | 7.24% |
▷ Public methods | 139 | 91.45% |
▷ Protected methods | 13 | 8.55% |
▷ Private methods | 0 | 0.00% |
Functions | 129 | |
▷ Named functions | 82 | 63.57% |
▷ Anonymous functions | 47 | 36.43% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
logo.png | 19.41KB | 8.32KB | ▼ 57.13% |