68% streamweasels-kick-integration

Code Review | StreamWeasels Kick Integration

WordPress plugin StreamWeasels Kick Integration scored68%from 54 tests.

About plugin

  • Plugin page: streamweasels-kic...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 1, 2023
  • Latest release: Nov 11, 2023
  • Number of updates: 5
  • Update frequency: every 9.6 days
  • Top authors: streamweasels (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /114 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.12MB] [CPU: ▲32.48ms] 75% from 4 tests

This is a short check of server-side resources used by StreamWeasels Kick Integration
Please take the time to fix the following items
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.12MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.89 ▲5.4266.94 ▲28.99
Dashboard /wp-admin8.91 ▲5.6086.47 ▲35.49
Posts /wp-admin/edit.php8.91 ▲5.5592.58 ▲44.77
Add New Post /wp-admin/post-new.php9.77 ▲3.88111.27 ▲21.82
Media Library /wp-admin/upload.php8.91 ▲5.6878.32 ▲43.63
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius8.9165.00

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 256 new files
Database: no new tables, 9 new options
New WordPress options
fs_accounts
fs_active_plugins
theysaidso_admin_options
fs_debug_mode
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for StreamWeasels Kick Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,122 ▲36015.48 ▲1.205.62 ▲3.8830.66 ▼12.86
Dashboard /wp-admin2,398 ▲2206.54 ▲0.85123.02 ▲24.8444.64 ▲6.99
Posts /wp-admin/edit.php2,340 ▲2433.67 ▲1.6451.24 ▲13.8331.85 ▼1.69
Add New Post /wp-admin/post-new.php1,747 ▲22125.26 ▲2.03632.81 ▼59.1842.31 ▼10.89
Media Library /wp-admin/upload.php1,475 ▲784.48 ▲0.3191.40 ▼15.6148.24 ▲6.01
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,3203.4147.9730.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/streamweasels-kick-integration/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • fs_accounts
    • widget_recent-posts
    • fs_active_plugins
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • fs_debug_mode
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/streamweasels-kick-integration/public/partials/streamweasels-kick-integration-public-display.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/streamweasels-kick-integration/public/partials/streamweasels-kick-status-public-display.php:18
    • > PHP Warning
      Use of undefined constant SWKI_PLUGIN_DIR - assumed 'SWKI_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/streamweasels-kick-integration/admin/partials/streamweasels-kick-integration-admin-sidebar.php on line 54
    • > PHP Fatal error
      Uncaught Error: Class 'Streamweasels_Kick_Integration_Admin' not found in wp-content/plugins/streamweasels-kick-integration/admin/class-streamweasels-kick-integration-admin-feature.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/streamweasels-kick-integration/public/partials/streamweasels-kick-wall-public-display.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/streamweasels-kick-integration/admin/partials/streamweasels-kick-integration-admin-display.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/streamweasels-kick-integration/public/partials/streamweasels-kick-feature-public-display.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Streamweasels_Kick_Integration_Admin' not found in wp-content/plugins/streamweasels-kick-integration/admin/class-streamweasels-kick-integration-admin-wall.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Streamweasels_Kick_Integration_Admin' not found in wp-content/plugins/streamweasels-kick-integration/admin/class-streamweasels-kick-integration-admin-status.php:23
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/streamweasels-kick-integration/admin/partials/streamweasels-kick-integration-admin-sidebar.php:70

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: kick, kick streams, kick integration, kick widget, kick embed...

streamweasels-kick-integration/streamweasels-kick-integration.php Passed 13 tests

The primary PHP file in "StreamWeasels Kick Integration" version 1.0.5 is used by WordPress to initiate all plugin functionality
67 characters long description:
StreamWeasels Kick Integration for embedding live streams from Kick

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin39,941 lines of code in 192 files:
LanguageFilesBlank linesComment linesLines of code
PHP1388,54918,04936,304
Sass1061692,132
JavaScript181422311,314
JSON400170
CSS221221

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity76.90
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes61
▷ Abstract classes23.28%
▷ Concrete classes5996.72%
▷ Final classes00.00%
Methods1,401
▷ Static methods20114.35%
▷ Public methods99671.09%
▷ Protected methods171.21%
▷ Private methods38827.69%
Functions104
▷ Named functions104100.00%
▷ Anonymous functions00.00%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.33MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/feature.png23.03KB10.89KB▼ 52.70%
admin/img/twitch-logo.png2.30KB0.74KB▼ 67.87%
admin/img/wall.png28.58KB13.82KB▼ 51.65%
img/kick-icon.png1.33KB0.80KB▼ 40.07%
public/img/sw-blank.png2.93KB0.54KB▼ 81.50%