73% vrpress

Code Review | VRPress

WordPress plugin VRPress scored73%from 54 tests.

About plugin

  • Plugin page: vrpress
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 27, 2023
  • Latest release: Feb 27, 2023
  • Number of updates: 8
  • Update frequency: every 1.4 days
  • Top authors: ctltwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /359 total downloads

Benchmarks

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

Server-side resources used by VRPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3442.11 ▼2.07
Dashboard /wp-admin3.65 ▲0.3451.89 ▼15.64
Posts /wp-admin/edit.php3.76 ▲0.4054.88 ▲3.54
Add New Post /wp-admin/post-new.php6.30 ▲0.41100.83 ▼8.18
Media Library /wp-admin/upload.php3.57 ▲0.3440.25 ▲0.01
Documentation /wp-admin/edit.php?post_type=ubcvrpress&page=ubc_vrpress_documentations3.5434.97
Add New Tour /wp-admin/post-new.php?post_type=ubcvrpress3.6455.23
Settings /wp-admin/edit.php?post_type=ubcvrpress&page=ubc_vrpress_settings3.5235.82
All Tours /wp-admin/edit.php?post_type=ubcvrpress3.6243.10

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 48 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
vrpress_permalinks_flushed

Browser metrics Passed 4 tests

An overview of browser requirements for VRPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.28 ▼0.111.66 ▼0.2041.22 ▲0.15
Dashboard /wp-admin2,237 ▲605.68 ▲0.0689.72 ▼2.7642.60 ▲1.20
Posts /wp-admin/edit.php2,139 ▲392.05 ▲0.0441.43 ▲4.9237.34 ▼3.44
Add New Post /wp-admin/post-new.php6,230 ▲4,69919.02 ▼4.36884.15 ▲190.0061.91 ▲8.15
Media Library /wp-admin/upload.php1,439 ▲424.25 ▲0.0196.18 ▼19.7746.22 ▼1.73
Documentation /wp-admin/edit.php?post_type=ubcvrpress&page=ubc_vrpress_documentations8832.0123.8927.13
Add New Tour /wp-admin/post-new.php?post_type=ubcvrpress1,8746.30114.6044.56
Settings /wp-admin/edit.php?post_type=ubcvrpress&page=ubc_vrpress_settings8282.0224.6126.51
All Tours /wp-admin/edit.php?post_type=ubcvrpress1,1001.9331.1532.52

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • vrpress_permalinks_flushed
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=ubcvrpress&page=ubc_vrpress_settings
    • > Notice in wp-content/plugins/vrpress/includes/class-vrpress.php+317
    Trying to access array offset on value of type bool

SRP 50% 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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/vrpress/includes/template-single.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=ubcvrpress
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key=&libraries=places 235:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
There were not plugin tags detected

vrpress/vrpress.php Passed 13 tests

"VRPress" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
78 characters long description:
Create 360 virtual tours using images of your own or Google Streetview images.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,443 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP61773371,059
JavaScript6146284319
JSON10046
SVG140014
CSS5105

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity41.00
▷ Minimum class complexity6.00
▷ Maximum class complexity79.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods36
▷ Static methods822.22%
▷ Public methods3083.33%
▷ Protected methods00.00%
▷ Private methods616.67%
Functions12
▷ Named functions325.00%
▷ Anonymous functions975.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
10 PNG files occupy 0.43MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/src/image/map-marker-solid-default.png0.53KB0.66KB0.00%
assets/src/image/documentations/vr-type.png120.58KB40.51KB▼ 66.41%
assets/src/image/map-marker-solid.png0.51KB0.66KB0.00%
assets/src/image/documentations/shortcode-copy.png77.42KB24.07KB▼ 68.91%
assets/src/image/documentations/gutenberg-block.png20.82KB4.90KB▼ 76.49%