Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.34MB] [CPU: ▼289.10ms] Passed 4 tests
A check of server-side resources used by Hermit 音乐播放器
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.90 ▲0.39 | 63.45 ▲14.54 |
Dashboard /wp-admin | 3.75 ▲0.34 | 35.84 ▲3.26 |
Posts /wp-admin/edit.php | 3.97 ▲0.33 | 39.01 ▲2.54 |
Add New Post /wp-admin/post-new.php | 7.28 ▲0.31 | 94.38 ▼1,166.73 |
Media Library /wp-admin/upload.php | 3.69 ▲0.39 | 27.01 ▲4.53 |
帮助 /wp-admin/admin.php?page=hermit-help | 3.59 | 24.37 |
音乐库 /wp-admin/admin.php?page=hermit | 3.70 | 31.36 |
设置 /wp-admin/admin.php?page=hermit-setting | 3.61 | 24.95 |
Server storage [IO: ▲0.44MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 44 new files
Database: 2 new tables, no new options
New tables |
---|
wp_hermit_cat |
wp_hermit |
Browser metrics Passed 4 tests
Checking browser requirements for Hermit 音乐播放器
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,835 ▲81 | 15.93 ▼0.13 | 6.45 ▲0.47 | 2.81 ▼0.03 |
Dashboard /wp-admin | 2,931 ▲73 | 6.11 ▼0.07 | 117.51 ▼24.67 | 197.53 ▲29.26 |
Posts /wp-admin/edit.php | 2,730 ▲39 | 3.13 ▼0.11 | 64.39 ▲0.34 | 150.06 ▲2.93 |
Add New Post /wp-admin/post-new.php | 1,658 ▼3 | 20.37 ▲4.03 | 362.33 ▼57.29 | 195.17 ▲23.95 |
Media Library /wp-admin/upload.php | 1,731 ▲33 | 5.50 ▲0.08 | 124.14 ▼14.80 | 219.77 ▲34.98 |
帮助 /wp-admin/admin.php?page=hermit-help | 1,329 | 2.39 | 55.08 | 203.64 |
音乐库 /wp-admin/admin.php?page=hermit | 1,558 | 5.03 | 86.64 | 170.00 |
设置 /wp-admin/admin.php?page=hermit-setting | 1,601 | 2.43 | 55.79 | 203.65 |
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
You still need to fix the following
- The uninstall procedure failed, leaving 2 tables in the database
- wp_hermit_cat
- wp_hermit
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
SRP 50% 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
Almost there! Just fix the following items
- 8× PHP files trigger server errors when accessed directly:
- > PHP Warning
require(HERMIT_PATH/Meting.php): failed to open stream: No such file or directory in wp-content/plugins/hermit/class.json.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/hermit/include/setting.php:11
- > PHP Warning
Use of undefined constant HERMIT_PATH - assumed 'HERMIT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/hermit/class.json.php on line 4
- > PHP Fatal error
require(): Failed opening required 'HERMIT_PATH/Meting.php' (include_path='.:/usr/share/php') in wp-content/plugins/hermit/class.json.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/hermit/include/help.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/hermit/hermit.php:12
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/hermit/include/library.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/hermit/include/template.php:18
- > PHP Warning
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 Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: flash, html5
hermit/hermit.php Passed 13 tests
The main PHP script in "Hermit 音乐播放器" version 3.1.6 is automatically included on every request by WordPress
55 characters long description:
音乐播放器 Hermit music player build for wordpress
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin5,648 lines of code in 21 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 8 | 196 | 151 | 3,640 |
PHP | 9 | 372 | 1,508 | 1,260 |
CSS | 3 | 126 | 23 | 727 |
SVG | 1 | 0 | 0 | 21 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 74.00 |
▷ Minimum class complexity | 41.00 |
▷ Maximum class complexity | 121.00 |
Average method complexity | 3.30 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.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 | 94 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 43 | 45.74% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 51 | 54.26% |
Functions | 3 | |
▷ Named functions | 2 | 66.67% |
▷ Anonymous functions | 1 | 33.33% |
Constants | 5 | |
▷ Global constants | 4 | 80.00% |
▷ Class constants | 1 | 20.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
11 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 |
assets/images/logo.png | 1.32KB | 0.73KB | ▼ 44.52% |
assets/images/cover@3x.png | 4.71KB | 2.26KB | ▼ 51.88% |
assets/images/logo@2x.png | 1.76KB | 1.39KB | ▼ 20.89% |
assets/images/playing_blue.png | 1.13KB | 0.23KB | ▼ 79.31% |
assets/images/playing_pink.png | 1.11KB | 0.23KB | ▼ 78.97% |