83% video-comments-webcam-recorder

Code Review | HTML5 Webcam/Screen/Mic Recorder for Video Comments and Forms

WordPress plugin HTML5 Webcam/Screen/Mic Recorder for Video Comments and Forms scored 83% from 54 tests.

About plugin

  • Plugin page: video-comments-we...
  • Plugin version: 2.2.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.1
  • WordPress version: 6.3.1
  • First release: Jul 27, 2012
  • Latest release: Feb 12, 2023
  • Number of updates: 40
  • Update frequency: every 96.5 days
  • Top authors: videowhisper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 10,424 total downloads

Benchmarks

Plugin footprint 83% 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.04MB] [CPU: ▼0.25ms] Passed 4 tests

This is a short check of server-side resources used by HTML5 Webcam/Screen/Mic Recorder for Video Comments and Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.08 ▼2.74
Dashboard /wp-admin3.34 ▲0.0351.81 ▼0.82
Posts /wp-admin/edit.php3.45 ▲0.0953.51 ▲3.91
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.18 ▲0.81
Media Library /wp-admin/upload.php3.26 ▲0.0340.27 ▲1.74
Form Recorder /wp-admin/admin.php?page=irecorder3.2239.58
Settings /wp-admin/admin.php?page=irecorder-settings3.2334.09

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
VWinlineRecorderOptions
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for HTML5 Webcam/Screen/Mic Recorder for Video Comments and Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲9513.29 ▼0.341.72 ▼0.5240.96 ▼4.88
Dashboard /wp-admin2,261 ▲584.89 ▼1.03100.75 ▼0.9647.07 ▲5.13
Posts /wp-admin/edit.php2,147 ▲582.01 ▼0.0237.29 ▲4.0735.03 ▲1.51
Add New Post /wp-admin/post-new.php1,578 ▲4523.62 ▲0.43685.94 ▼0.3259.92 ▲1.13
Media Library /wp-admin/upload.php1,440 ▲494.21 ▼0.03104.24 ▼0.3946.15 ▲2.85
Form Recorder /wp-admin/admin.php?page=irecorder9882.1529.2634.38
Settings /wp-admin/admin.php?page=irecorder-settings9882.1825.2538.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • VWinlineRecorderOptions
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/video-comments-webcam-recorder/inlinerecorder.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Video comments: include video/audio in WordPress comments), #2 (HTML5 Recorder: recorder webcam/microphone 100% web based)
You can take inspiration from this readme.txt

video-comments-webcam-recorder/inlinerecorder.php 85% from 13 tests

The entry point to "HTML5 Webcam/Screen/Mic Recorder for Video Comments and Forms" version 2.2.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("video-comments-webcam-recorder.php" instead of "inlinerecorder.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 302 characters long)

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
There were no executable files found in this plugin9,707 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
SVG30128,882
PHP331082771
CSS2138551
JavaScript3003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity47.00
▷ Minimum class complexity13.00
▷ Maximum class complexity93.00
Average method complexity6.11
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces1
Interfaces0
Traits2
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods2592.59%
▷ Public methods27100.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 Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.17MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png141.50KB44.29KB▼ 68.70%
static/media/flags.99f63ae7.png27.46KB29.21KB0.00%