Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼309.61ms] Passed 4 tests
A check of server-side resources used by DPlayer for WordPress
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.07 | 326.38 ▲271.74 |
Dashboard /wp-admin | 3.43 ▲0.02 | 34.87 ▲0.29 |
Posts /wp-admin/edit.php | 3.65 ▲0.01 | 41.70 ▼0.35 |
Add New Post /wp-admin/post-new.php | 6.89 ▼0.08 | 96.55 ▼1,239.01 |
Media Library /wp-admin/upload.php | 3.30 ▲0.01 | 23.73 ▲0.63 |
DPlayer /wp-admin/options-general.php?page=kblog-dplayer | 3.27 | 23.72 |
Server storage [IO: ▲0.38MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 4 new options
New WordPress options |
---|
kblog_danmaku_dplayer_version_check |
kblog_danmaku_token |
kblog_danmaku_dplayer_version |
kblog_danmaku_url |
Browser metrics Passed 4 tests
DPlayer for WordPress: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,806 ▲52 | 16.04 ▲0.04 | 16.26 ▲9.34 | 2.37 ▼0.24 |
Dashboard /wp-admin | 2,897 ▲36 | 6.14 ▼0.05 | 118.72 ▼32.78 | 161.76 ▼12.24 |
Posts /wp-admin/edit.php | 2,696 ▲2 | 3.24 ▲0.01 | 63.44 ▼0.68 | 145.21 ▼9.04 |
Add New Post /wp-admin/post-new.php | 1,664 ▲7 | 16.01 ▼3.47 | 442.13 ▲7.55 | 160.78 ▼31.29 |
Media Library /wp-admin/upload.php | 1,703 ▲5 | 5.53 ▲0.03 | 139.55 ▼11.45 | 189.95 ▼2.05 |
DPlayer /wp-admin/options-general.php?page=kblog-dplayer | 1,109 | 2.38 | 53.41 | 184.88 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully
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
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 2× 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/dplayer-for-wp/dplayer-admin.php:147
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/dplayer-for-wp/dplayer-admin.php:147
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found
Optimizations
Plugin configuration 93% 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
Please fix the following attributes:
- Plugin Name: You should set the name of your plugin on the first line (
=== dplayer-for-wp ===
)
dplayer-for-wp/dplayer.php 92% from 13 tests
"DPlayer for WordPress" version 1.2.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("dplayer-for-wp.php" instead of "dplayer.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin323 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 45 | 37 | 290 |
JavaScript | 3 | 0 | 1 | 33 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.61 |
Average class complexity | 35.00 |
▷ Minimum class complexity | 10.00 |
▷ Maximum class complexity | 60.00 |
Average method complexity | 5.53 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 39.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 15 | |
▷ Static methods | 8 | 53.33% |
▷ Public methods | 15 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin