Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
- Install procedure had errors
- > Error in wp-content/plugins/random-online-twitch-stream-from-selection/services/TwitchStreamFormDataNormalizer.php+14
Uncaught TypeError: Argument 1 passed to TwitchStreamFormDataNormalizer::__construct() must be of the type array, bool given, called in wp-content/plugins/random-online-twitch-stream-from-selection/admin/TwitchStreamAdministrationPage.php on line 23 and defined in wp-content/plugins/random-online-twitch-stream-from-selection/services/TwitchStreamFormDataNormalizer.php:14
Stack trace:
#0 wp-content/plugins/random-online-twitch-stream-from-selection/admin/TwitchStreamAdministrationPage.php(23): TwitchStreamFormDataNormalizer->__construct()
#1 wp-content/plugins/random-online-twitch-stream-from-selection/services/TwitchStreamKernel.php(22): TwitchStreamAdministrationPage->__construct()
#2 wp-content/plugins/random-online-twitch-stream-from-selection/twitch-stream.php(37): TwitchStreamKernel::run()
#3 wp-content/plugins/random-online-twitch-stream-from-selection/twitch-stream.php(40): runTwitchSteam()
Server metrics [RAM: ▲0.00MB] [CPU: ▼5.70ms] Passed 4 tests
This is a short check of server-side resources used by Random Online Twitch Stream from selection
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 42.58 ▲0.50 |
Dashboard /wp-admin | 3.31 ▲0.00 | 45.49 ▼5.55 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 50.21 ▲3.14 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 81.41 ▼18.79 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.15 ▲1.05 |
Server storage [IO: ▲1.09MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Random Online Twitch Stream from selection
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲68 | 13.18 ▼1.20 | 2.04 ▼0.42 | 37.87 ▼7.04 |
Dashboard /wp-admin | 2,200 ▲9 | 5.95 ▲1.04 | 100.22 ▼17.66 | 40.82 ▼4.19 |
Posts /wp-admin/edit.php | 2,092 ▲3 | 2.06 ▲0.06 | 38.88 ▼1.39 | 36.43 ▲1.33 |
Add New Post /wp-admin/post-new.php | 1,534 ▲6 | 23.15 ▲4.86 | 640.97 ▲10.72 | 59.38 ▼1.40 |
Media Library /wp-admin/upload.php | 1,382 ▼0 | 4.24 ▲0.01 | 95.77 ▼5.26 | 41.81 ▼0.17 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
- 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/random-online-twitch-stream-from-selection/services/TwitchStreamKernel.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/random-online-twitch-stream-from-selection/admin/TwitchStreamAdministrationPage.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/random-online-twitch-stream-from-selection/admin/partials/fields-output.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/random-online-twitch-stream-from-selection/public/TwitchStreamPublicPage.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/random-online-twitch-stream-from-selection/public/partials/output.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/random-online-twitch-stream-from-selection/templates/twitch-stream-app.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 90% 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:
- Contributors: Plugin contributors not specified
random-online-twitch-stream-from-selection/twitch-stream.php 85% from 13 tests
The principal PHP file in "Random Online Twitch Stream from selection" v. 1.1.0 is loaded by WordPress automatically on each request
The following require your attention:
- 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
- Main file name: It is recommended to name the main PHP file as the plugin slug ("random-online-twitch-stream-from-selection.php" instead of "twitch-stream.php")
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
Good job! No executable or dangerous file extensions detected797 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 15 | 90 | 63 | 409 |
CSS | 2 | 62 | 1 | 339 |
JavaScript | 1 | 8 | 0 | 49 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.18 |
Average class complexity | 2.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 6.00 |
Average method complexity | 1.46 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 26 | |
▷ Static methods | 3 | 11.54% |
▷ Public methods | 25 | 96.15% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 3.85% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 3 | 100.00% |
▷ Public constants | 1 | 33.33% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/twitch-rail.png | 7.07KB | 4.04KB | ▼ 42.93% |
admin/img/new.png | 6.50KB | 6.48KB | 0.23% |
admin/img/twitch-player.png | 6.97KB | 4.26KB | ▼ 38.90% |
admin/img/twitch-wall.png | 7.49KB | 4.16KB | ▼ 44.49% |