10% twitch-tv-embed-suite

Code Review | Twitch TV Embed Suite

WordPress plugin Twitch TV Embed Suite scored10%from 54 tests.

About plugin

  • Plugin page: twitch-tv-embed-s...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.9-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 7, 2013
  • Latest release: Jul 12, 2016
  • Number of updates: 28
  • Update frequency: every 39.3 days
  • Top authors: plumwd (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

200+ active /44,665 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/twitch-tv-embed-suite/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; PlumwdTwitchStatusWidget has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼51.05ms] Passed 4 tests

This is a short check of server-side resources used by Twitch TV Embed Suite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.337.34 ▼29.09
Dashboard /wp-admin2.15 ▼1.155.99 ▼40.30
Posts /wp-admin/edit.php2.15 ▼1.206.03 ▼40.22
Add New Post /wp-admin/post-new.php2.15 ▼3.736.13 ▼94.59
Media Library /wp-admin/upload.php2.15 ▼1.087.22 ▼27.17
Twitch Embed /wp-admin/admin.php?page=twitch-options2.156.78
Help /wp-admin/admin.php?page=twitch-help2.157.67

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 11 new options
New WordPress options
pte_streamheight
pte_chatheight
can_compress_scripts
pte_chatwidth
widget_recent-comments
widget_plumwdtwitchstatuswidget
theysaidso_admin_options
widget_theysaidso_widget
pte_streamwidth
widget_recent-posts
...

Browser metrics Passed 4 tests

Checking browser requirements for Twitch TV Embed Suite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲10513.48 ▼1.191.94 ▲0.0838.13 ▼6.78
Dashboard /wp-admin2,257 ▲695.04 ▼0.87102.04 ▼10.9477.23 ▲29.62
Posts /wp-admin/edit.php2,145 ▲562.33 ▲0.3234.46 ▼8.3334.62 ▼0.49
Add New Post /wp-admin/post-new.php1,556 ▲3723.11 ▼0.11797.31 ▲130.1339.25 ▼19.25
Media Library /wp-admin/upload.php1,439 ▲484.30 ▲0.1397.77 ▼2.2177.34 ▲33.98
Twitch Embed /wp-admin/admin.php?page=twitch-options9181.9128.3539.08
Help /wp-admin/admin.php?page=twitch-help9741.9228.5433.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/twitch-tv-embed-suite/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; PlumwdTwitchStatusWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_plumwdtwitchstatuswidget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=twitch-help
    • > Deprecated in wp-content/plugins/twitch-tv-embed-suite/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; PlumwdTwitchStatusWidget has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=twitch-help
    • > Deprecated in wp-content/plugins/twitch-tv-embed-suite/widget.php+126
    Function create_function() is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=twitch-help
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in PlumwdTwitchStatusWidget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twitch-tv-embed-suite/index.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/twitch-tv-embed-suite/includes/help.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/twitch-tv-embed-suite/widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

twitch-tv-embed-suite/index.php 92% from 13 tests

Analyzing the main PHP file in "Twitch TV Embed Suite" version 2.1.0
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("twitch-tv-embed-suite.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected446 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP37123388
JavaScript31429
CSS11115
XML10013
JSON1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/offline.png1.25KB0.43KB▼ 65.47%
images/chat.png1.41KB0.54KB▼ 61.79%
images/online.png1.25KB0.43KB▼ 65.89%
images/tv.png1.53KB0.82KB▼ 46.03%
images/plumeria.png2.82KB1.54KB▼ 45.33%