Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.73MB] [CPU: ▲3.95ms] Passed 4 tests
This is a short check of server-side resources used by StreamWeasels Twitch Integration
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.12 ▲0.66 | 55.65 ▲12.98 |
Dashboard /wp-admin | 4.10 ▲0.76 | 61.60 ▼1.81 |
Posts /wp-admin/edit.php | 4.15 ▲0.80 | 62.43 ▲14.44 |
Add New Post /wp-admin/post-new.php | 6.63 ▲0.74 | 90.98 ▼8.18 |
Media Library /wp-admin/upload.php | 4.00 ▲0.77 | 49.17 ▲12.79 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 4.21 | 47.93 |
Server storage [IO: ▲4.63MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 271 new files
Database: no new tables, 10 new options
New WordPress options |
---|
fs_debug_mode |
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
swti_debug_log |
widget_theysaidso_widget |
fs_accounts |
widget_recent-comments |
fs_active_plugins |
can_compress_scripts |
Browser metrics Passed 4 tests
StreamWeasels Twitch Integration: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,149 ▲362 | 15.38 ▲1.03 | 7.01 ▲4.98 | 28.12 ▼16.28 |
Dashboard /wp-admin | 2,413 ▲236 | 6.48 ▲0.82 | 123.39 ▲25.13 | 85.77 ▲41.16 |
Posts /wp-admin/edit.php | 2,357 ▲254 | 3.77 ▲1.77 | 59.27 ▲21.96 | 70.03 ▲34.72 |
Add New Post /wp-admin/post-new.php | 6,448 ▲4,922 | 28.16 ▲4.88 | 1,017.87 ▲304.69 | 42.28 ▼15.93 |
Media Library /wp-admin/upload.php | 1,490 ▲93 | 4.44 ▲0.10 | 87.78 ▼36.02 | 94.07 ▲43.63 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 1,309 | 3.37 | 48.67 | 29.36 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/streamweasels-twitch-integration/freemius/includes/class-freemius.php+8546
Undefined property: stdClass::$plugins
- Zombie WordPress options detected upon uninstall: 9 options
- widget_recent-posts
- widget_recent-comments
- fs_accounts
- theysaidso_admin_options
- fs_debug_mode
- widget_theysaidso_widget
- db_upgraded
- fs_active_plugins
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% 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
Please fix the following
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/streamweasels-twitch-integration/public/partials/streamweasels-public-display.php
- > /wp-content/plugins/streamweasels-twitch-integration/admin/partials/streamweasels-admin-sidebar.php
- 10× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/streamweasels-twitch-integration/public/partials/streamweasels-player-public-display.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function swti_twitch_get_layout_options() in wp-content/plugins/streamweasels-twitch-integration/admin/partials/streamweasels-admin-sidebar.php:90
- > PHP Warning
Use of undefined constant SWTI_PLUGIN_DIR - assumed 'SWTI_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/streamweasels-twitch-integration/admin/partials/streamweasels-admin-sidebar.php on line 74
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/streamweasels-twitch-integration/public/partials/streamweasels-vods-public-display.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/streamweasels-twitch-integration/admin/class-streamweasels-admin.php:2246
- > PHP Fatal error
Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/streamweasels-twitch-integration/admin/partials/streamweasels-admin-display.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/streamweasels-twitch-integration/public/partials/streamweasels-rail-public-display.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/streamweasels-twitch-integration/public/partials/streamweasels-status-public-display.php:18
- > PHP Warning
Use of undefined constant SWTI_PLUGIN_DIR - assumed 'SWTI_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/streamweasels-twitch-integration/admin/partials/streamweasels-admin-sidebar.php on line 57
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/streamweasels-twitch-integration/public/partials/streamweasels-wall-public-display.php:18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: block, gutenberg, twitch widget, twitch streams, twitch api...
streamweasels-twitch-integration/streamweasels.php 77% from 13 tests
The entry point to "StreamWeasels Twitch Integration" version 1.7.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("streamweasels-twitch-integration.php" instead of "streamweasels.php")
- Plugin Name: Please shorten the plugin name (currently 74 characters long instead of max. 70)
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis 97% from 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
There were no executable files found in this plugin45,000 lines of code in 202 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 143 | 8,809 | 18,199 | 37,684 |
Sass | 14 | 121 | 108 | 4,473 |
JavaScript | 18 | 186 | 229 | 2,611 |
JSON | 4 | 0 | 0 | 210 |
CSS | 23 | 1 | 2 | 22 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 76.58 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,096.00 |
Average method complexity | 4.48 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 64 | |
▷ Abstract classes | 2 | 3.12% |
▷ Concrete classes | 62 | 96.88% |
▷ Final classes | 0 | 0.00% |
Methods | 1,440 | |
▷ Static methods | 201 | 13.96% |
▷ Public methods | 1,033 | 71.74% |
▷ Protected methods | 17 | 1.18% |
▷ Private methods | 390 | 27.08% |
Functions | 113 | |
▷ Named functions | 111 | 98.23% |
▷ Anonymous functions | 2 | 1.77% |
Constants | 147 | |
▷ Global constants | 100 | 68.03% |
▷ Class constants | 47 | 31.97% |
▷ Public constants | 47 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.38MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
admin/img/twitch-rail.png | 7.07KB | 4.04KB | ▼ 42.93% |
admin/img/kick-logo.png | 2.23KB | 0.53KB | ▼ 76.23% |
admin/img/swti-logo-vertical.png | 82.61KB | 38.44KB | ▼ 53.47% |
admin/img/twitch-feature.png | 12.89KB | 6.05KB | ▼ 53.01% |