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: ▼0.11MB] [CPU: ▼11.18ms] Passed 4 tests
This is a short check of server-side resources used by WP-Xiami 虾米音乐同步
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.89 ▼0.58 | 21.50 ▼22.71 |
Dashboard /wp-admin | 3.37 ▲0.02 | 55.90 ▼11.31 |
Posts /wp-admin/edit.php | 3.48 ▲0.12 | 51.33 ▼3.81 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.06 | 89.55 ▼6.90 |
Media Library /wp-admin/upload.php | 3.29 ▲0.06 | 38.82 ▲2.10 |
虾米音乐同步 /wp-admin/admin.php?page=wp-xiami | 3.19 | 29.94 |
基础设置 /wp-admin/admin.php?page=wp-xiami-option | 3.27 | 34.68 |
Server storage [IO: ▲0.29MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WP-Xiami 虾米音乐同步
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,815 ▲54 | 14.25 ▼0.12 | 1.72 ▼0.04 | 43.65 ▲2.67 |
Dashboard /wp-admin | 2,215 ▲35 | 5.55 ▼0.03 | 92.99 ▼4.43 | 87.85 ▲47.18 |
Posts /wp-admin/edit.php | 2,129 ▲26 | 1.99 ▼0.03 | 34.51 ▼7.17 | 43.04 ▲7.16 |
Add New Post /wp-admin/post-new.php | 1,567 ▲31 | 23.05 ▲4.55 | 699.67 ▲36.29 | 53.61 ▼44.46 |
Media Library /wp-admin/upload.php | 1,426 ▲23 | 4.15 ▼0.07 | 93.42 ▼18.51 | 80.27 ▲32.60 |
虾米音乐同步 /wp-admin/admin.php?page=wp-xiami | 990 | 2.65 | 56.45 | 51.34 |
基础设置 /wp-admin/admin.php?page=wp-xiami-option | 985 | 1.69 | 25.34 | 71.31 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
- 12 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wp-xiami-option
- > Notice in wp-content/plugins/wp-xiami/class.xiami.php+176
Trying to access array offset on value of type bool
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/wp-xiami/include/wp-xiami.php
- 6× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-xiami/wp-xiami.php:13
- > PHP Warning
require(WP_XIAMI_PATH/class.fetchjs.php): failed to open stream: No such file or directory in wp-content/plugins/wp-xiami/function.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-xiami/static/tmpl/tpl-wp-xiami.php:5
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-xiami/include/wp-xiami-option.php:37
- > PHP Warning
Use of undefined constant WP_XIAMI_PATH - assumed 'WP_XIAMI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-xiami/function.php on line 4
- > PHP Fatal error
require(): Failed opening required 'WP_XIAMI_PATH/class.fetchjs.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-xiami/function.php on line 4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: xiami, html5, flash
wp-xiami/wp-xiami.php Passed 13 tests
The primary PHP file in "WP-Xiami 虾米音乐同步" version 0.0.8 is used by WordPress to initiate all plugin functionality
60 characters long description:
虾米音乐同步 WP-Xiami for wordpress xiami music player
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 plugin869 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 150 | 29 | 696 |
JavaScript | 5 | 0 | 98 | 146 |
HTML | 3 | 0 | 0 | 25 |
CSS | 2 | 2 | 18 | 2 |
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.36 |
Average class complexity | 29.00 |
▷ Minimum class complexity | 11.00 |
▷ Maximum class complexity | 43.00 |
Average method complexity | 3.55 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.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 | 33 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 31 | 93.94% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 6.06% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 22 | |
▷ Global constants | 4 | 18.18% |
▷ Class constants | 18 | 81.82% |
▷ Public constants | 18 | 100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
static/images/wpxm.png | 2.61KB | 1.24KB | ▼ 52.43% |
static/images/icon.png | 1.64KB | 0.65KB | ▼ 60.19% |