67% webcam-2way-videochat

Code Review | 2Way VideoCalls and Random Chat - HTML5 Webcam Videochat

WordPress plugin 2Way VideoCalls and Random Chat - HTML5 Webcam Videochat scored67%from 54 tests.

About plugin

  • Plugin page: webcam-2way-video...
  • Plugin version: 5.4.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Dec 23, 2013
  • Latest release: Oct 6, 2023
  • Number of updates: 71
  • Update frequency: every 50.3 days
  • Top authors: videowhisper (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /18,923 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.77MB] [CPU: ▼2.74ms] Passed 4 tests

This is a short check of server-side resources used by 2Way VideoCalls and Random Chat - HTML5 Webcam Videochat
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.29 ▲0.8249.61 ▲6.18
Dashboard /wp-admin4.11 ▲0.8060.63 ▲6.20
Posts /wp-admin/edit.php4.16 ▲0.8051.10 ▼3.73
Add New Post /wp-admin/post-new.php6.63 ▲0.7492.21 ▼18.61
Media Library /wp-admin/upload.php3.97 ▲0.7445.84 ▲5.22
VideoCalls /wp-admin/admin.php?page=videocalls3.9838.85
Settings /wp-admin/admin.php?page=videocalls-settings3.9838.92

Server storage [IO: ▲11.19MB] [DB: ▲0.03MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 64 new files
Database: 5 new tables, 9 new options
New tables
wp_vw_2wrooms
wp_vw_2wmatch
wp_vw_2w_sessions
wp_vw_2wsessions
wp_vw_2w_chatlog
New WordPress options
widget_theysaidso_widget
widget_recent-posts
VWvideoChat_requirements
vw2vc_db_version
VWvideoChatOptions
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for 2Way VideoCalls and Random Chat - HTML5 Webcam Videochat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲16614.38 ▲0.032.00 ▲0.0443.78 ▲2.04
Dashboard /wp-admin2,304 ▲1245.73 ▲0.0996.61 ▲8.6445.40 ▲1.91
Posts /wp-admin/edit.php2,207 ▲1252.15 ▲0.1239.25 ▲3.8136.66 ▼7.98
Add New Post /wp-admin/post-new.php1,641 ▲11023.54 ▲0.26733.12 ▲26.8355.89 ▼8.13
Media Library /wp-admin/upload.php1,506 ▲1064.29 ▲0.07100.02 ▼15.7744.46 ▼4.19
VideoCalls /wp-admin/admin.php?page=videocalls1,2242.1926.8233.46
Settings /wp-admin/admin.php?page=videocalls-settings1,2272.1624.2833.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables detected upon uninstall: 5 tables
    • wp_vw_2w_sessions
    • wp_vw_2wrooms
    • wp_vw_2wmatch
    • wp_vw_2w_chatlog
    • wp_vw_2wsessions
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • can_compress_scripts
    • db_upgraded
    • vw2vc_db_version
    • VWvideoChat_requirements
    • VWvideoChatOptions
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=videocalls
    • > Notice in wp-content/plugins/webcam-2way-videochat/inc/requirements.php+232
    Undefined index: status

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=videocalls
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=videocalls 168:8 Uncaught SyntaxError: Unexpected token 'function'
    • > GET request to /wp-admin/admin.php?page=videocalls-settings
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=videocalls-settings 168:8 Uncaught SyntaxError: Unexpected token 'function'

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Random Videochat (Match Roulette) with Filters), #2 (HTML5 Videochat Call in Dark Mode), #3 (HTML5 Videochat Call in Light Mode), #4 (Audio/Video recorder to also insert recordings in text chat (when user connection does not permit live streaming)), #5 (WP user page to manage video chat rooms), #6 (Legacy 2 Way Video Chat Flash App (included))
Please take inspiration from this readme.txt

webcam-2way-videochat/webcam-2way-videochat.php 92% from 13 tests

Analyzing the main PHP file in "2Way VideoCalls and Random Chat - HTML5 Webcam Videochat" version 5.4.6
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 317 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin21,483 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
SVG602418,181
PHP41,1583183,145
PO File13338101
CSS3139552
JavaScript40104

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 115)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity129.50
▷ Minimum class complexity43.00
▷ Maximum class complexity224.00
Average method complexity8.91
▷ Minimum method complexity1.00
▷ Maximum method complexity115.00
Code structure
Namespaces1
Interfaces0
Traits3
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods65
▷ Static methods6396.92%
▷ Public methods65100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 1.03MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png984.89KB327.95KB▼ 66.70%
images/avatar.png2.83KB1.87KB▼ 33.83%
js/semantic/themes/default/assets/images/flags.png27.46KB29.21KB0.00%
static/media/flags.99f63ae7.png27.46KB29.21KB0.00%
images/chat.png5.46KB2.84KB▼ 48.04%