72% stream-status-for-twitch

Code Review | Twitch Live Status

WordPress plugin Twitch Live Status scored72%from 54 tests.

About plugin

  • Plugin page: stream-status-for...
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 31, 2016
  • Latest release: Jun 15, 2023
  • Number of updates: 29
  • Update frequency: every 81.2 days
  • Top authors: BonfireThemes (62.07%)j.burleigh1 (41.38%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /27,295 total downloads

Benchmarks

Plugin footprint 82% 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 gracefully, with no errors

Server metrics [RAM: ▲0.58MB] [CPU: ▼2.46ms] Passed 4 tests

Server-side resources used by Twitch Live Status
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5743.34 ▼11.30
Dashboard /wp-admin3.90 ▲0.5561.65 ▲0.26
Posts /wp-admin/edit.php3.95 ▲0.5957.75 ▲5.88
Add New Post /wp-admin/post-new.php6.50 ▲0.6191.85 ▼4.48
Media Library /wp-admin/upload.php3.82 ▲0.5943.94 ▲5.69
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.8340.24
[Add-On] Status /wp-admin/admin.php?page=streamweasels-status3.7032.80

Server storage [IO: ▲0.48MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/stream-status-for-twitch/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Twitch Live Status
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲20713.65 ▼0.735.62 ▲3.9943.38 ▲5.66
Dashboard /wp-admin2,261 ▲555.89 ▲1.00116.48 ▲1.4650.35 ▲9.21
Posts /wp-admin/edit.php2,152 ▲522.19 ▲0.1638.40 ▼0.4337.74 ▲1.99
Add New Post /wp-admin/post-new.php1,572 ▲3923.12 ▼0.35633.92 ▼47.2659.77 ▲3.60
Media Library /wp-admin/upload.php1,451 ▲514.27 ▲0.03100.06 ▼16.8449.35 ▲0.46
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,0342.0927.8733.51
[Add-On] Status /wp-admin/admin.php?page=streamweasels-status8031.7226.0827.91

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 did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=streamweasels-status
    • > Warning in wp-content/plugins/stream-status-for-twitch/admin/class-streamweasels-status-pro-admin.php+411
    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-status
    • > Warning in wp-content/plugins/stream-status-for-twitch/admin/class-streamweasels-status-pro-admin.php+411
    include(): Failed opening 'wp-content/plugins/admin/partials/streamweasels-admin-display.php' for inclusion (include_path='.:/usr/share/php')

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/stream-status-for-twitch/admin/partials/streamweasels-status-pro-admin-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/stream-status-for-twitch/includes/class-streamweasels-tgmpa.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/stream-status-for-twitch/public/partials/streamweasels-status-pro-public-display.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
Attributes that need to be fixed: You can take inspiration from this readme.txt

stream-status-for-twitch/stream-status-for-twitch.php 92% from 13 tests

The principal PHP file in "Twitch Live Status" v. 2.0.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin8,098 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JSON2005,124
PHP136942,1722,333
Sass2230555
JavaScript6151485
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity26.73
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods146
▷ Static methods74.79%
▷ Public methods11880.82%
▷ Protected methods2315.75%
▷ Private methods53.42%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.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