78% live-stream-badger

Code Review | Live Stream Badger

WordPress plugin Live Stream Badger scored78%from 54 tests.

About plugin

  • Plugin page: live-stream-badger
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.8
  • WordPress version: 6.3.1
  • First release: Apr 14, 2013
  • Latest release: Jan 11, 2014
  • Number of updates: 51
  • Update frequency: every 5.3 days
  • Top authors: tkrivickas (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

40+ active /11,959 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.40ms] Passed 4 tests

A check of server-side resources used by Live Stream Badger
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.54 ▼2.03
Dashboard /wp-admin3.33 ▼0.0151.68 ▼16.01
Posts /wp-admin/edit.php3.39 ▲0.0347.79 ▼1.58
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.90 ▼9.97
Media Library /wp-admin/upload.php3.26 ▲0.0340.62 ▲6.75
Live Stream Badger /wp-admin/options-general.php?page=live-stream-badger3.2032.97

Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 8 new options
New WordPress options
widget_lsb_stream_status_widget
live-stream-badger:version
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Live Stream Badger
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.38 ▲0.081.69 ▼0.3544.15 ▲0.11
Dashboard /wp-admin2,199 ▲225.58 ▼0.0597.13 ▲0.8641.40 ▲1.43
Posts /wp-admin/edit.php2,101 ▼22.01 ▲0.0241.15 ▲2.5337.15 ▲1.26
Add New Post /wp-admin/post-new.php1,534 ▲823.02 ▲5.52676.54 ▲13.8162.35 ▲5.27
Media Library /wp-admin/upload.php1,401 ▲14.26 ▲0.02110.25 ▲0.9246.23 ▲3.78
Live Stream Badger /wp-admin/options-general.php?page=live-stream-badger8722.0224.7431.78

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • live-stream-badger:version
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_lsb_stream_status_widget

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)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=live-stream-badger
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=live-stream-badger
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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
The following issues need your attention
  • 4× 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/live-stream-badger/live-stream-badger-plugin.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/live-stream-badger/stream-status-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'livestreambadger\\LSB_API' not found in wp-content/plugins/live-stream-badger/apis/twitch-api-v3.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'livestreambadger\\LSB_View' not found in wp-content/plugins/live-stream-badger/view/class-embedded-twitch-view.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: widget, menu, live stream, twitch, stream status

live-stream-badger/live-stream-badger-plugin.php 92% from 13 tests

The entry point to "Live Stream Badger" version 1.4.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("live-stream-badger.php" instead of "live-stream-badger-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,043 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP21239301897
Markdown1480110
CSS114236

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.75
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes20
▷ Abstract classes210.00%
▷ Concrete classes1890.00%
▷ Final classes00.00%
Methods62
▷ Static methods812.90%
▷ Public methods5588.71%
▷ Protected methods46.45%
▷ Private methods34.84%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants13
▷ Global constants323.08%
▷ Class constants1076.92%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin