Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼0.94MB] [CPU: ▼35.35ms] Passed 4 tests
Server-side resources used by 友言评论 UYan Comment
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.01 | 39.60 ▼2.33 |
Dashboard /wp-admin | 3.01 ▼0.30 | 22.70 ▼25.53 |
Posts /wp-admin/edit.php | 3.01 ▼0.35 | 24.03 ▼29.00 |
Add New Post /wp-admin/post-new.php | 3.01 ▼2.88 | 22.97 ▼76.77 |
Media Library /wp-admin/upload.php | 3.01 ▼0.23 | 26.95 ▼10.09 |
数据同步 /wp-admin/admin.php?page=uyan_sync | 3.01 | 22.86 |
友言评论 /wp-admin/admin.php?page=uyan | 3.01 | 23.68 |
统计分析 /wp-admin/admin.php?page=uyan_analysis | 3.01 | 23.02 |
安装设置 /wp-admin/admin.php?page=uyan_setting | 3.01 | 25.51 |
Server storage [IO: ▲0.11MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for 友言评论 UYan Comment
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,855 ▲120 | 13.19 ▼1.19 | 1.86 ▼0.46 | 40.10 ▼2.65 |
Dashboard /wp-admin | 2,239 ▲48 | 5.82 ▲0.94 | 111.15 ▲0.85 | 90.65 ▲46.81 |
Posts /wp-admin/edit.php | 2,122 ▲33 | 2.00 ▼0.00 | 38.81 ▼2.87 | 46.47 ▲8.47 |
Add New Post /wp-admin/post-new.php | 1,692 ▲158 | 21.64 ▼1.44 | 691.31 ▲94.89 | 56.09 ▲1.44 |
Media Library /wp-admin/upload.php | 1,412 ▲27 | 4.22 ▼0.10 | 100.64 ▼4.04 | 72.35 ▲30.57 |
数据同步 /wp-admin/admin.php?page=uyan_sync | 842 | 2.03 | 25.15 | 52.28 |
友言评论 /wp-admin/admin.php?page=uyan | 845 | 2.08 | 23.92 | 40.72 |
统计分析 /wp-admin/admin.php?page=uyan_analysis | 842 | 2.03 | 24.77 | 39.98 |
安装设置 /wp-admin/admin.php?page=uyan_setting | 842 | 2.03 | 24.83 | 39.71 |
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
The following items require your attention
- Uninstall procedure had uncaught errors
- > User deprecated in wp-includes/functions.php+5453
Function add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead.
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=uyan_setting
- > User deprecated in wp-includes/functions.php+5453
Function add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead.
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
- 5× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/uyan/uyan_code.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/uyan/uyan_header.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/uyan/uyan_plugin.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/uyan/uyan_header.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/uyan/uyan_header.php:1
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=uyan_setting
- > Network (severe)
http://www.uyan.cc/resource/js/notice.js - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
- Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
- Screenshots: These screenshots do not have images: #1 (评论框样式), #2 (自定义设置), #3 (评论管理), #4 (数据分析)
uyan/uyan_plugin.php 85% from 13 tests
"友言评论 UYan Comment" version 4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
- Description: The description should be shorter than 140 characters (currently 432 characters long)
- Main file name: It is recommended to name the main PHP file as the plugin slug ("uyan.php" instead of "uyan_plugin.php")
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 plugin268 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 22 | 12 | 151 |
JavaScript | 1 | 0 | 3 | 117 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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
7 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-4.png | 16.31KB | 16.30KB | 0.03% |
screenshot-5.png | 22.27KB | 21.97KB | ▼ 1.32% |
screenshot-2.png | 15.11KB | 15.06KB | 0.32% |
img/uyan_logo.png | 1.83KB | 1.77KB | ▼ 3.31% |
screenshot-3.png | 24.92KB | 24.98KB | 0.00% |