78% 360deg-javascript-viewer

Code Review | 360 Javascript Viewer

WordPress plugin 360 Javascript Viewer scored78%from 54 tests.

About plugin

  • Plugin page: 360deg-javascript...
  • Plugin version: 1.7.11
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 17, 2020
  • Latest release: Aug 22, 2023
  • Number of updates: 87
  • Update frequency: every 12.3 days
  • Top authors: jtermaat (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /19,141 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.24MB] [CPU: ▼2.28ms] Passed 4 tests

An overview of server-side resources used by 360 Javascript Viewer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2634.72 ▼7.33
Dashboard /wp-admin3.59 ▲0.2850.13 ▲1.43
Posts /wp-admin/edit.php3.64 ▲0.2954.69 ▲11.42
Add New Post /wp-admin/post-new.php6.10 ▲0.2282.64 ▼4.98
Media Library /wp-admin/upload.php3.43 ▲0.2038.32 ▲1.75
Autorotate /wp-admin/admin.php?page=jsv-autorotate-settings3.4337.50
About /wp-admin/admin.php?page=jsv-about3.4334.14
Local configuration /wp-admin/admin.php?page=jsv-dedicated-settings3.4335.57
Notifier /wp-admin/admin.php?page=jsv-license-notifier3.4236.31
360 Javascript Viewer /wp-admin/admin.php?page=jsv-main-settings3.4236.73
Remove Powered By /wp-admin/admin.php?page=jsv-license-settings3.4337.43
Remote configuration /wp-admin/admin.php?page=jsv-cloud-settings3.4335.65
ACF Settings /wp-admin/admin.php?page=jsv-acf-settings3.4336.17

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 74 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_360-javasciptviewer-widget
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for 360 Javascript Viewer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,063 ▲31715.29 ▲0.915.41 ▲3.6338.58 ▼6.30
Dashboard /wp-admin2,421 ▲2306.52 ▲1.64134.52 ▲23.2395.29 ▲51.28
Posts /wp-admin/edit.php2,339 ▲2533.38 ▲1.3653.95 ▲16.2573.11 ▲38.83
Add New Post /wp-admin/post-new.php6,433 ▲4,91027.83 ▲4.64903.80 ▲256.8938.21 ▼13.38
Media Library /wp-admin/upload.php1,475 ▲874.16 ▼0.0379.24 ▼20.0357.89 ▲13.85
Autorotate /wp-admin/admin.php?page=jsv-autorotate-settings1,1413.0539.7681.57
About /wp-admin/admin.php?page=jsv-about1,1143.0039.3262.08
Local configuration /wp-admin/admin.php?page=jsv-dedicated-settings1,1733.1540.1574.74
Notifier /wp-admin/admin.php?page=jsv-license-notifier1,1253.2341.8379.91
360 Javascript Viewer /wp-admin/admin.php?page=jsv-main-settings1,1363.0039.5281.93
Remove Powered By /wp-admin/admin.php?page=jsv-license-settings1,1213.1439.4361.99
Remote configuration /wp-admin/admin.php?page=jsv-cloud-settings1,1013.1538.4061.79
ACF Settings /wp-admin/admin.php?page=jsv-acf-settings1,1193.2036.9761.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_360-javasciptviewer-widget
    • db_upgraded

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/360deg-javascript-viewer/admin/partials/button.php
    • > /wp-content/plugins/360deg-javascript-viewer/admin/partials/footer.php
  • 20× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/360deg-javascript-viewer/admin/partials/header.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/360deg-javascript-viewer/admin/partials/header.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/360deg-javascript-viewer/admin/partials/header.php:12
    • > PHP Warning
      Use of undefined constant JSV360_VERSION - assumed 'JSV360_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/360deg-javascript-viewer/blocks/block.asset.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/360deg-javascript-viewer/admin/partials/header.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/360deg-javascript-viewer/admin/partials/header.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/360deg-javascript-viewer/widgets/class-jsv-360-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'JSV_360_ADMIN_PAGE_ABSTRACT' not found in wp-content/plugins/360deg-javascript-viewer/admin/pages/class-jsv-360-admin_page_acf.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/360deg-javascript-viewer/admin/partials/header.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JSV_360_ADMIN_PAGE_ABSTRACT' not found in wp-content/plugins/360deg-javascript-viewer/admin/pages/class-jsv-360-admin_page_dedicated.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Screenshots: Screenshot #7 (Control the viewer with the elementor widget) image not found
Please take inspiration from this readme.txt

360deg-javascript-viewer/360-jsv.php 92% from 13 tests

The principal PHP file in "360 Javascript Viewer" v. 1.7.11 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("360deg-javascript-viewer.php" instead of "360-jsv.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected20,829 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
JSON30017,696
PHP383073351,686
JavaScript67568619
Sass12734382
CSS3142371
SVG20075

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.05
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes14.55%
▷ Concrete classes2195.45%
▷ Final classes00.00%
Methods83
▷ Static methods44.82%
▷ Public methods5363.86%
▷ Protected methods22.41%
▷ Private methods2833.73%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants28
▷ Global constants414.29%
▷ Class constants2485.71%
▷ Public constants24100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/icon.png3.39KB2.34KB▼ 30.89%
admin/img/sign-130.png6.54KB4.42KB▼ 32.38%
admin/img/cloud.png7.74KB4.24KB▼ 45.20%
admin/img/local.png33.41KB15.53KB▼ 53.52%
admin/img/first_image_select.png36.01KB13.67KB▼ 62.04%