84% broadcast-companion

Code Review | Broadcast Companion (Twitch)

WordPress plugin Broadcast Companion (Twitch) scored84%from 54 tests.

About plugin

  • Plugin page: broadcast-companion
  • Plugin version: 3.0.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 27, 2018
  • Latest release: Jul 15, 2023
  • Number of updates: 34
  • Update frequency: every 56.0 days
  • Top authors: j.burleigh1 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /8,475 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.39ms] Passed 4 tests

Analyzing server-side resources used by Broadcast Companion (Twitch)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.07 ▼3.94
Dashboard /wp-admin3.34 ▲0.0342.78 ▼8.50
Posts /wp-admin/edit.php3.39 ▲0.0346.26 ▲3.02
Add New Post /wp-admin/post-new.php5.93 ▲0.0581.20 ▼8.13
Media Library /wp-admin/upload.php3.26 ▲0.0336.08 ▲3.48

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Broadcast Companion (Twitch)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.19 ▼1.181.77 ▼0.0339.54 ▼2.49
Dashboard /wp-admin2,234 ▲495.89 ▲0.02105.75 ▼0.5073.56 ▲28.89
Posts /wp-admin/edit.php2,111 ▲222.06 ▲0.0534.28 ▼3.2231.65 ▼2.54
Add New Post /wp-admin/post-new.php1,537 ▲1817.56 ▼5.77692.81 ▼3.0038.31 ▼26.67
Media Library /wp-admin/upload.php1,410 ▲194.24 ▼0.0394.82 ▼3.8871.83 ▲25.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/broadcast-companion/bc-companion.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/broadcast-companion/bc-companion-notice.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
No tags were detected

broadcast-companion/bc-companion.php 92% from 13 tests

The main PHP script in "Broadcast Companion (Twitch)" version 3.0.6 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("broadcast-companion.php" instead of "bc-companion.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected792 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP312048481
JavaScript42310301
CSS1009
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions2787.10%
▷ Anonymous functions412.90%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
300x169-placeholder.png19.55KB1.06KB▼ 94.60%
weasels-icon.png2.42KB1.19KB▼ 50.63%