84% vr-views

Code Review | VR Views

WordPress plugin VR Views scored 84% from 54 tests.

About plugin

  • Plugin page: vr-views
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7
  • WordPress version: 6.3.1
  • First release: Apr 8, 2016
  • Latest release: Dec 28, 2016
  • Number of updates: 14
  • Update frequency: every 18.8 days
  • Top authors: goldsounds (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 9,014 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.98ms] Passed 4 tests

Server-side resources used by VR Views
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.75 ▼0.56
Dashboard /wp-admin3.32 ▲0.0142.14 ▼4.17
Posts /wp-admin/edit.php3.37 ▲0.0144.33 ▼3.87
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.71 ▼19.32
Media Library /wp-admin/upload.php3.24 ▲0.0136.82 ▲2.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for VR Views
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.70 ▼0.685.31 ▲3.6646.46 ▲6.86
Dashboard /wp-admin2,210 ▲224.84 ▼0.97106.93 ▲0.2035.77 ▼2.53
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0539.77 ▲2.3836.31 ▲2.21
Add New Post /wp-admin/post-new.php1,518 ▼1517.72 ▼5.43659.06 ▼8.4158.03 ▲0.79
Media Library /wp-admin/upload.php1,392 ▲14.31 ▲0.1294.43 ▼5.7642.75 ▼2.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/vr-views/admin/partials/vr-views-admin-display.php
    • > /wp-content/plugins/vr-views/public/partials/vr-views-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: 360, google cardboard, vr, virtual reality, video...

vr-views/vr-views.php Passed 13 tests

This is the main PHP file of "VR Views" version 1.5.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
62 characters long description:
Display Google's VR Views in a browser a compatible VR devices

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 plugin23,772 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript416,3814,51123,449
PHP12123528185
CSS37888
HTML12024
JSON10020
SVG2006

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.16
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions3
▷ Named functions3100.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
4 PNG files occupy 4.51MB with 2.71MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png1,412.63KB634.44KB▼ 55.09%
assets/banner-772x250.png288.95KB87.63KB▼ 69.67%
assets/banner-1544x500.png1,085.63KB326.49KB▼ 69.93%
assets/screenshot-2.png1,827.80KB986.49KB▼ 46.03%