Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.51MB] [CPU: ▼1.94ms] Passed 4 tests
This is a short check of server-side resources used by Twitch Player
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.98 ▲0.52 | 41.07 ▼7.95 |
Dashboard /wp-admin | 3.85 ▲0.55 | 50.20 ▲1.60 |
Posts /wp-admin/edit.php | 3.90 ▲0.54 | 51.70 ▲4.21 |
Add New Post /wp-admin/post-new.php | 6.39 ▲0.50 | 97.50 ▼5.63 |
Media Library /wp-admin/upload.php | 3.71 ▲0.48 | 44.69 ▲12.82 |
[StreamWeasels] Twitch Player /wp-admin/options-general.php?page=twitch-tv-player | 3.69 | 35.58 |
[Add-On] Player /wp-admin/admin.php?page=streamweasels-player | 3.65 | 49.98 |
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins | 3.78 | 34.59 |
Server storage [IO: ▲0.48MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by Twitch Player
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,929 ▲183 | 13.72 ▼0.70 | 4.65 ▲2.90 | 40.03 ▼3.57 |
Dashboard /wp-admin | 2,252 ▲64 | 5.87 ▲0.97 | 95.94 ▼16.72 | 41.17 ▲0.76 |
Posts /wp-admin/edit.php | 2,143 ▲54 | 2.07 ▲0.05 | 42.27 ▲7.45 | 41.51 ▲10.12 |
Add New Post /wp-admin/post-new.php | 1,564 ▲36 | 18.39 ▲0.37 | 590.51 ▼0.48 | 46.04 ▼7.73 |
Media Library /wp-admin/upload.php | 1,445 ▲54 | 4.27 ▲0.10 | 94.99 ▼4.73 | 48.10 ▲3.07 |
[StreamWeasels] Twitch Player /wp-admin/options-general.php?page=twitch-tv-player | 1,546 | 9.11 | 283.14 | 81.28 |
[Add-On] Player /wp-admin/admin.php?page=streamweasels-player | 794 | 2.06 | 27.30 | 29.82 |
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins | 1,023 | 2.10 | 22.63 | 31.16 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
- > GET request to /wp-admin/admin.php?page=streamweasels-player
- > Warning in wp-content/plugins/ttv-easy-embed-player/admin/class-streamweasels-player-pro-admin.php+165
include(wp-content/plugins/admin/partials/streamweasels-admin-display.php): failed to open stream: No such file or directory
- > GET request to /wp-admin/admin.php?page=streamweasels-player
- > Warning in wp-content/plugins/ttv-easy-embed-player/admin/class-streamweasels-player-pro-admin.php+165
include(): Failed opening 'wp-content/plugins/admin/partials/streamweasels-admin-display.php' for inclusion (include_path='.:/usr/share/php')
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ttv-easy-embed-player/admin/partials/streamweasels-player-pro-admin-display.php:21
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ttv-easy-embed-player/public/partials/streamweasels-player-pro-public-display.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function did_action() in wp-content/plugins/ttv-easy-embed-player/includes/class-streamweasels-tgmpa.php:2109
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: twitch player, twitch api, twitch, twitch widget, twitchtv...
ttv-easy-embed-player/twitch-player.php 85% from 13 tests
The main PHP file in "Twitch Player" ver. 2.1.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ttv-easy-embed-player.php" instead of "twitch-player.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin8,179 lines of code in 25 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 2 | 0 | 0 | 5,117 |
PHP | 12 | 666 | 2,148 | 2,324 |
Sass | 2 | 2 | 25 | 654 |
JavaScript | 5 | 19 | 34 | 82 |
CSS | 4 | 0 | 8 | 2 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.50 |
Average class complexity | 24.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 206.00 |
Average method complexity | 3.52 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 34.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 15 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 15 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 139 | |
▷ Static methods | 7 | 5.04% |
▷ Public methods | 111 | 79.86% |
▷ Protected methods | 23 | 16.55% |
▷ Private methods | 5 | 3.60% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 1 | 25.00% |
▷ Class constants | 3 | 75.00% |
▷ Public constants | 3 | 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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/sw-full-logo.png | 62.43KB | 26.24KB | ▼ 57.97% |