10% html5-virtual-classroom

Code Review | BrainCert - HTML5 Virtual Classroom

WordPress plugin BrainCert - HTML5 Virtual Classroom scored10%from 54 tests.

About plugin

  • Plugin page: html5-virtual-cla...
  • Plugin version: 1.30
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Jan 13, 2017
  • Latest release: Dec 29, 2022
  • Number of updates: 44
  • Update frequency: every 49.2 days
  • Top authors: BrainCert (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /11,742 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▼0.58MB] [CPU: ▼33.42ms] Passed 4 tests

Server-side resources used by BrainCert - HTML5 Virtual Classroom
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.3035.24 ▼13.53
Dashboard /wp-admin3.64 ▲0.0729.35 ▼20.89
Posts /wp-admin/edit.php3.64 ▼0.0429.83 ▼25.99
Add New Post /wp-admin/post-new.php3.64 ▼2.5127.94 ▼73.25
Media Library /wp-admin/upload.php3.64 ▲0.1563.33 ▲22.86
Attendance report /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/attendancereport3.6431.79
Instructor Preview /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inspreview3.6428.88
Permissions /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/Permissions3.6429.47
Configuration /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/Configuration3.6426.68
Invite Users /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inviteusers3.6430.65
Invite User group /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inviteusergroup3.6430.18
Payments /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/Payments3.6431.02
RecordingList /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/RecordingList3.6825.74
ViewRecording /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording3.6830.35
Virtual Classroom /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php3.6427.72

Server storage [IO: ▲2.50MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 85 new files
Database: 7 new tables, 6 new options
New tables
wp_virtualclassroom_purchase
wp_virtualclassroom_shorturl
wp_virtualclassroom_teacher
wp_virtualclassroom_acl
wp_virtualclassroom_settings
wp_virtualclassroom_email_template_settings
wp_virtualclassroom_shared_users
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for BrainCert - HTML5 Virtual Classroom
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲6014.31 ▼0.071.61 ▼0.6538.50 ▼3.99
Dashboard /wp-admin2,234 ▲575.67 ▲0.0282.41 ▼10.8064.76 ▲21.28
Posts /wp-admin/edit.php2,155 ▲522.02 ▼0.0338.32 ▼0.7738.82 ▲1.10
Add New Post /wp-admin/post-new.php1,588 ▲6223.09 ▲5.67719.20 ▲26.8453.40 ▲2.47
Media Library /wp-admin/upload.php1,442 ▲424.27 ▲0.05100.81 ▼2.0449.30 ▲6.55
Attendance report /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/attendancereport8342.0124.4228.92
Instructor Preview /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inspreview8502.0226.5932.40
Permissions /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/Permissions8372.0224.6527.85
Configuration /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/Configuration9872.0625.0532.49
Invite Users /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inviteusers8652.0227.6324.65
Invite User group /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inviteusergroup8332.0225.4626.41
Payments /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/Payments9042.0526.6228.47
RecordingList /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/RecordingList9282.1025.7234.00
ViewRecording /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording8502.3335.1327.25
Virtual Classroom /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php9592.0122.8834.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 41 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_view_recording_admin.php+29
    Undefined index: id
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_admin_class_function.php+496
    Undefined variable: key
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording
    • > User deprecated in wp-includes/class-requests.php+24
    The PSR-0 `Requests_...` class names in the Requests library are deprecated. Switch to the PSR-4 `WpOrg\Requests\...` class names at your earliest convenience.
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inspreview
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_instructor_preview.php+65
    Undefined offset: 0
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inspreview
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_instructor_preview.php+65
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/attendancereport
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_attendance_report.php+31
    Undefined index: Report
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inspreview
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_admin_class_function.php+261
    Undefined index: ispaid
    • > GET request to /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inspreview
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_admin_class_function.php+261
    Undefined index: status
    • > GET request to /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inspreview
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_admin_class_function.php+272
    Undefined index: title
    • > GET request to /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inspreview
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_instructor_preview.php+42
    Undefined variable: class
    • > GET request to /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/inviteusergroup
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_invite_user_group.php+13
    Undefined index: type
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php/Payments
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_admin_class_function.php+662
    Undefined index: page1
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_view_recording_admin.php+24
    Undefined variable: vlcr_setting
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_view_recording_admin.php+35
    Undefined index: cid
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording
    • > Notice in wp-content/plugins/html5-virtual-classroom/vlcr_view_recording_admin.php+62
    Undefined index: Recording

SRP Passed 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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=html5-virtual-classroom/vlcr_setup.php
    • > Network (severe)
    http://../wp-admin/images/generic.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: The element or ID supplied is not valid. (videojs)" "TypeError: The element or ID supplied is not valid. (videojs)\n at videojs (/wp-content/plugins/html5-virtual-classroom//js/vlcr_video.js?ver=6.3.1:24228:11)\n at HTMLDocument.\u003Canonymous> (/wp-admin/options.php?page=html5-virtual-classroom%2Fvlcr_setup.php%2FViewRecording:154:26)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options.php?page=html5-virtual-classroom/vlcr_setup.php/ViewRecording
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: The element or ID supplied is not valid. (videojs)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (21 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

html5-virtual-classroom/vlcr_setup.php 92% from 13 tests

The primary PHP file in "BrainCert - HTML5 Virtual Classroom" version 1.30 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("html5-virtual-classroom.php" instead of "vlcr_setup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin34,641 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript67,26013,31924,808
PHP299003496,050
CSS6341933,383
SVG100399
HTML1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity84.00
▷ Minimum class complexity84.00
▷ Maximum class complexity84.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions48
▷ Named functions48100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
34 PNG files occupy 0.31MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/class_list.png0.21KB0.24KB0.00%
images/icon-48-campaign.png3.75KB2.30KB▼ 38.81%
images/icon-conf.png2.22KB1.55KB▼ 30.23%
images/payments.png3.63KB2.15KB▼ 40.62%
images/recording.png1.22KB1.21KB▼ 0.88%