78% ttv-easy-embed-wall

Code Review | Twitch Wall

WordPress plugin Twitch Wall scored78%from 54 tests.

About plugin

  • Plugin page: ttv-easy-embed-wall
  • Plugin version: 2.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 4, 2018
  • Latest release: Jun 14, 2023
  • Number of updates: 39
  • Update frequency: every 47.9 days
  • Top authors: j.burleigh1 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /17,838 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.49MB] [CPU: ▼2.96ms] Passed 4 tests

Analyzing server-side resources used by Twitch Wall
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5039.76 ▼2.56
Dashboard /wp-admin3.83 ▲0.5347.41 ▼4.56
Posts /wp-admin/edit.php3.88 ▲0.5248.24 ▲2.74
Add New Post /wp-admin/post-new.php6.37 ▲0.4881.92 ▼7.44
Media Library /wp-admin/upload.php3.69 ▲0.4640.88 ▲5.52
[StreamWeasels] Twitch Wall /wp-admin/options-general.php?page=twitch-tv-wall3.6734.84
[Add-On] Wall /wp-admin/admin.php?page=streamweasels-wall3.6340.42
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.8633.90

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Twitch Wall
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15413.45 ▼0.927.96 ▲6.3740.09 ▲1.02
Dashboard /wp-admin2,240 ▲605.61 ▼0.1182.40 ▼6.2943.05 ▲0.74
Posts /wp-admin/edit.php2,157 ▲542.17 ▲0.1436.79 ▲1.3937.31 ▼0.66
Add New Post /wp-admin/post-new.php1,566 ▲2823.17 ▲0.07653.26 ▼14.9359.50 ▼3.24
Media Library /wp-admin/upload.php1,456 ▲564.21 ▼0.0194.76 ▼23.1646.25 ▼2.69
[StreamWeasels] Twitch Wall /wp-admin/options-general.php?page=twitch-tv-wall1,5519.39288.7179.80
[Add-On] Wall /wp-admin/admin.php?page=streamweasels-wall8081.7126.0727.53
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,0352.0724.7927.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=streamweasels-wall
    • > Warning in wp-content/plugins/ttv-easy-embed-wall/admin/class-streamweasels-wall-pro-admin.php+153
    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-wall
    • > Warning in wp-content/plugins/ttv-easy-embed-wall/admin/class-streamweasels-wall-pro-admin.php+153
    include(): Failed opening 'wp-content/plugins/admin/partials/streamweasels-admin-display.php' for inclusion (include_path='.:/usr/share/php')

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just 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 plugin_dir_url() in wp-content/plugins/ttv-easy-embed-wall/admin/partials/streamweasels-wall-pro-admin-display.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ttv-easy-embed-wall/public/partials/streamweasels-wall-pro-public-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/ttv-easy-embed-wall/includes/class-streamweasels-tgmpa.php:2109

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: twitch, twitch api, twitch streams, twitch wall, twitch widget...

ttv-easy-embed-wall/twitch-wall.php 85% from 13 tests

The primary PHP file in "Twitch Wall" version 2.1.5 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ttv-easy-embed-wall.php" instead of "twitch-wall.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin7,886 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JSON2005,036
PHP126402,1612,245
Sass236531
JavaScript5162972
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity23.93
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods134
▷ Static methods75.22%
▷ Public methods10679.10%
▷ Protected methods2317.16%
▷ Private methods53.73%
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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/sw-full-logo.png62.43KB26.24KB▼ 57.97%