67% vr-calendar-sync

Code Review | VR Calendar

WordPress plugin VR Calendar scored67%from 54 tests.

About plugin

  • Plugin page: vr-calendar-sync
  • Plugin version: 2.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.0
  • WordPress version: 6.3.1
  • First release: Aug 11, 2015
  • Latest release: May 23, 2023
  • Number of updates: 47
  • Update frequency: every 62.2 days
  • Top authors: Innate Images LLC (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

900+ active /15,715 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 gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼11.24ms] Passed 4 tests

A check of server-side resources used by VR Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1639.53 ▲0.80
Dashboard /wp-admin3.53 ▲0.1941.78 ▼12.92
Posts /wp-admin/edit.php3.57 ▲0.2144.71 ▼2.39
Add New Post /wp-admin/post-new.php6.18 ▲0.2972.64 ▼29.16
Media Library /wp-admin/upload.php3.41 ▲0.1832.02 ▼0.50
Add Calendar /wp-admin/admin.php?page=vr-calendar-add-calendar3.3930.00
Information /wp-admin/admin.php?page=vr-calendar-information3.3530.33
Dashboard /wp-admin/admin.php?page=vr-calendar-dashboard3.3931.21
Settings /wp-admin/admin.php?page=vr-calendar-settings3.3726.04

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 94 new files
Database: 2 new tables, 6 new options
New tables
wp_vrcalandar_bookings
wp_vrcalandar
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for VR Calendar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,003 ▲25714.21 ▼0.3910.00 ▲8.2840.66 ▼0.76
Dashboard /wp-admin2,270 ▲795.12 ▼0.93111.19 ▲11.9538.03 ▼1.62
Posts /wp-admin/edit.php2,161 ▲722.39 ▲0.3837.81 ▲0.3934.58 ▲2.14
Add New Post /wp-admin/post-new.php1,567 ▲4817.85 ▼5.22676.43 ▲14.5337.17 ▼14.87
Media Library /wp-admin/upload.php1,455 ▲674.52 ▲0.3496.60 ▼3.8443.21 ▲0.85
Add Calendar /wp-admin/admin.php?page=vr-calendar-add-calendar2,2723.1275.0224.81
Information /wp-admin/admin.php?page=vr-calendar-information8502.1326.5722.38
Dashboard /wp-admin/admin.php?page=vr-calendar-dashboard1,0122.1127.1731.54
Settings /wp-admin/admin.php?page=vr-calendar-settings9732.1225.6122.69

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
  • Zombie tables detected upon uninstall: 2 tables
    • wp_vrcalandar
    • wp_vrcalandar_bookings
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/vr-calendar-sync/Public/Views/Shortcodes/Payment.view.php
  • 44× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/vr-calendar-sync/Admin/Views/Part/Settings/General.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'VRCSingleton' not found in wp-content/plugins/vr-calendar-sync/Admin/Classes/VRCalendarAdmin.class.php:27
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/vr-calendar-sync/Public/Views/Shortcodes/Booking.view.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'VRCalendarEntity' not found in wp-content/plugins/vr-calendar-sync/Admin/Views/AddCalendar.php:27
    • > PHP Notice
      Trying to get property 'calendar_layout_options' of non-object in wp-content/plugins/vr-calendar-sync/Public/Views/Shortcodes/Booking.view.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'VRCSingleton' not found in wp-content/plugins/vr-calendar-sync/Includes/Classes/Email/VRCEmail.class.php:27
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/vr-calendar-sync/Public/Views/Shortcodes/Booking.view.php on line 19
    • > PHP Notice
      Trying to get property 'calendar_payment_method' of non-object in wp-content/plugins/vr-calendar-sync/Public/Views/Shortcodes/Payment.view.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'VRCalendarSettings' not found in wp-content/plugins/vr-calendar-sync/Admin/Views/Settings.php:27
    • > PHP Fatal error
      require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/vr-calendar-sync/Includes/Vendor/ics-parser/examples/index.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-4.png)
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

vr-calendar-sync/vrcalendar.php 77% from 13 tests

Analyzing the main PHP file in "VR Calendar" version 2.4.0
Please take the time to fix the following:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/Languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("vr-calendar-sync.php" instead of "vrcalendar.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin10,137 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP371,0112,4346,670
JavaScript5212391,468
CSS880117889
SVG100288
HTML14513250
Markdown4560239
PO File16567159
YAML4150118
JSON10049
XML1007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity30.33
▷ Minimum class complexity1.00
▷ Maximum class complexity312.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes18
▷ Abstract classes15.56%
▷ Concrete classes1794.44%
▷ Final classes00.00%
Methods241
▷ Static methods52.07%
▷ Public methods20283.82%
▷ Protected methods3815.77%
▷ Private methods10.41%
Functions11
▷ Named functions00.00%
▷ Anonymous functions11100.00%
Constants18
▷ Global constants633.33%
▷ Class constants1266.67%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.42MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-close.png0.91KB0.69KB▼ 23.60%
screenshot-4.png61.14KB16.14KB▼ 73.59%
assets/images/arrow_left.png0.70KB0.65KB▼ 7.91%
screenshot-1.png144.43KB48.02KB▼ 66.75%
assets/images/arrow_right.png0.71KB0.64KB▼ 8.71%