89% wp-virtualtour

Code Review | WP Virtual Tour

WordPress plugin WP Virtual Tour scored89%from 54 tests.

About plugin

  • Plugin page: wp-virtualtour
  • Plugin version: 1.0.12
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.6
  • WordPress version: 6.3.1
  • First release: Jan 22, 2021
  • Latest release: Mar 16, 2021
  • Number of updates: 20
  • Update frequency: every 2.8 days
  • Top authors: xsonic (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /1,096 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.29MB] [CPU: ▼9.57ms] Passed 4 tests

This is a short check of server-side resources used by WP Virtual Tour
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▼0.6028.73 ▼18.27
Dashboard /wp-admin3.32 ▲0.0267.17 ▲14.21
Posts /wp-admin/edit.php3.37 ▲0.0253.66 ▲2.75
Add New Post /wp-admin/post-new.php5.31 ▼0.5775.85 ▼21.84
Media Library /wp-admin/upload.php3.24 ▲0.0236.53 ▼0.90

Server storage [IO: ▲3.60MB] [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, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP Virtual Tour
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.56 ▼0.848.81 ▲6.7343.53 ▼3.53
Dashboard /wp-admin2,221 ▲295.80 ▲0.8296.47 ▼26.4539.11 ▼7.34
Posts /wp-admin/edit.php2,104 ▲152.01 ▲0.0240.09 ▲3.5435.03 ▼5.60
Add New Post /wp-admin/post-new.php1,536 ▲123.21 ▲0.31605.72 ▼74.3453.35 ▼0.44
Media Library /wp-admin/upload.php1,406 ▲184.21 ▼0.0697.05 ▼5.8743.43 ▼5.93

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Admin interface), #2 (Block editor), #3 (Frontend view)
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

wp-virtualtour/wp-virtualtour.php 92% from 13 tests

"WP Virtual Tour" version 1.0.12's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

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
Good job! No executable or dangerous file extensions detected36,228 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
JSON40020,786
CSS31,2333412,178
Sass23501481,279
Vuejs Component668311,011
PHP12160515523
JavaScript9359451

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.88
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods2769.23%
▷ Protected methods00.00%
▷ Private methods1230.77%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 PNG files occupy 1.27MB with 0.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/vue-app/static/img/pannellum-placeholder.png17.75KB20.19KB0.00%
admin/vue-app/static/img/scene-placeholder.png6.80KB1.87KB▼ 72.44%
assets/screenshot-1.png456.81KB178.80KB▼ 60.86%
assets/screenshot-2.png420.51KB156.95KB▼ 62.68%
assets/screenshot-3.png397.67KB151.44KB▼ 61.92%