77% coviu-video-calls

Code Review | Coviu Video Calls

WordPress plugin Coviu Video Calls scored77%from 54 tests.

About plugin

  • Plugin page: coviu-video-calls
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Sep 18, 2016
  • Latest release: Mar 13, 2018
  • Number of updates: 35
  • Update frequency: every 15.5 days
  • Top authors: Coviu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,772 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼7.13ms] Passed 4 tests

An overview of server-side resources used by Coviu Video Calls
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1933.93 ▼2.76
Dashboard /wp-admin3.49 ▲0.1942.42 ▼4.34
Posts /wp-admin/edit.php3.60 ▲0.2549.26 ▼1.33
Add New Post /wp-admin/post-new.php6.07 ▲0.1978.73 ▼18.53
Media Library /wp-admin/upload.php3.41 ▲0.1933.50 ▼2.88
Coviu Calls /wp-admin/options-general.php?page=coviu-video-calls/coviu-calls.php3.3826.73

Server storage [IO: ▲1.87MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • The plugin illegally modified 1 file (1.66KB) outside of "wp-content/plugins/coviu-video-calls/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/single-cvu_session.php
Filesystem: 148 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
coviu-video-calls
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Coviu Video Calls
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.26 ▼1.161.84 ▲0.1138.57 ▼2.79
Dashboard /wp-admin2,239 ▲515.94 ▲1.07112.04 ▲0.8275.52 ▲35.32
Posts /wp-admin/edit.php2,119 ▲272.10 ▲0.0639.19 ▼4.3237.15 ▼0.79
Add New Post /wp-admin/post-new.php1,695 ▲16222.64 ▼0.61720.21 ▲41.5350.27 ▼4.80
Media Library /wp-admin/upload.php1,421 ▲364.27 ▲0.06106.51 ▼1.7945.72 ▼4.04
Coviu Calls /wp-admin/options-general.php?page=coviu-video-calls/coviu-calls.php9361.8026.8331.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 9× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/examples/cookie_jar.php
    • > /wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/examples/post.php
    • > /wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/examples/basic-auth.php
    • > /wp-content/plugins/coviu-video-calls/coviu-calls.php
    • > /wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/examples/session.php
    • > /wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/examples/multiple.php
    • > /wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/examples/cookie.php
    • > /wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/bin/create_pear_package.php
    • > /wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/examples/get.php
  • 67× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/coviu-video-calls/vendor/coviu/coviu-sdk/tests/Coviu/SdkTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception' not found in wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/library/Requests/Exception/Transport.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/tests/ChunkedEncoding.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/library/Requests/Exception/HTTP/413.php:13
    • > PHP Fatal error
      Uncaught Requests_Exception: cURL error 7: Failed to connect to 127.0.0.1 port 8080: Connection refused in wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/library/Requests/Transport/cURL.php:422
    • > PHP Fatal error
      Uncaught Error: Class 'RequestsTest_Transport_Base' not found in wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/tests/Transport/fsockopen.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/library/Requests/Exception/HTTP/500.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/coviu-video-calls/vendor/coviu/coviu-sdk/tests/Coviu/HttpTest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/tests/Auth/Basic.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/coviu-video-calls/vendor/rmccue/requests/tests/Proxy/HTTP.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Screenshot1.png : the admin interface of the Coviu video calls Wordpress plugin), #2 (Screenshot2.png : the appointments page of the Coviu video calls Wordpress plugin), #3 (Screenshot3.png : example video call on Coviu)
You can look at the official readme.txt

coviu-video-calls/coviu-calls.php 85% from 13 tests

"Coviu Video Calls" version 0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("coviu-video-calls.php" instead of "coviu-calls.php")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 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 plugin9,106 lines of code in 132 files:
LanguageFilesBlank linesComment linesLines of code
PHP1051,5943,8967,798
Markdown133990979
JSON400157
YAML310563
XML24060
Bourne Again Shell18127
Bourne Shell24012
CSS1106
Python1104

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.68
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces2
Interfaces4
Traits0
Classes91
▷ Abstract classes11.10%
▷ Concrete classes9098.90%
▷ Final classes00.00%
Methods517
▷ Static methods8716.83%
▷ Public methods46890.52%
▷ Protected methods448.51%
▷ Private methods50.97%
Functions63
▷ Named functions5892.06%
▷ Anonymous functions57.94%
Constants26
▷ Global constants27.69%
▷ Class constants2492.31%
▷ Public constants24100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 1.24MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png349.20KB91.18KB▼ 73.89%
images/DeleteRed.png0.96KB1.01KB0.00%
images/link.png0.83KB0.52KB▼ 37.12%
screenshot-3.png722.35KB240.00KB▼ 66.78%
images/icon.png0.97KB0.93KB▼ 4.04%