72% 360deg-javascript-viewer

Code Review | 360 Javascript Viewer

WordPress plugin 360 Javascript Viewer scored 72% from 54 tests.

About plugin

  • Plugin page: 360deg-javascript...
  • Plugin version: 1.6.15
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-5.7
  • WordPress version: 5.9.2
  • First release: Sep 17, 2020
  • Latest release: Dec 29, 2021
  • Number of updates: 57
  • Update frequency: every 8.2 days
  • Top authors: jtermaat (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active / 5,551 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼287.68ms] Passed 4 tests

A check of server-side resources used by 360 Javascript Viewer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2162.70 ▲11.31
Dashboard /wp-admin3.58 ▲0.1745.84 ▲11.82
Posts /wp-admin/edit.php3.81 ▲0.1740.91 ▲3.90
Add New Post /wp-admin/post-new.php7.09 ▲0.1292.60 ▼1,167.13
Media Library /wp-admin/upload.php3.51 ▲0.2225.79 ▲1.21
Notifier /wp-admin/admin.php?page=jsv-license-notifier3.5127.66
Autorotate /wp-admin/admin.php?page=jsv-autorotate-settings3.5127.46
360 Javascript Viewer /wp-admin/admin.php?page=jsv-main-settings3.5126.15
Remove Powered By /wp-admin/admin.php?page=jsv-license-settings3.5141.31

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 47 new files
Database: no new tables, 1 new option
New WordPress options
widget_360-javasciptviewer-widget

Browser metrics Passed 4 tests

360 Javascript Viewer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,081 ▲32717.75 ▲2.189.54 ▲3.032.29 ▼0.31
Dashboard /wp-admin3,172 ▲3188.02 ▲1.76140.98 ▲3.79175.59 ▲11.04
Posts /wp-admin/edit.php3,003 ▲3464.63 ▲1.4077.20 ▲13.39158.92 ▲12.65
Add New Post /wp-admin/post-new.php2,026 ▲27520.98 ▼1.00400.99 ▼50.20188.30 ▲31.77
Media Library /wp-admin/upload.php1,783 ▲885.59 ▲0.07103.15 ▼33.17201.43 ▲13.53
Notifier /wp-admin/admin.php?page=jsv-license-notifier1,4244.2372.30137.28
Autorotate /wp-admin/admin.php?page=jsv-autorotate-settings1,4444.2567.07126.64
360 Javascript Viewer /wp-admin/admin.php?page=jsv-main-settings1,4694.4168.01161.56
Remove Powered By /wp-admin/admin.php?page=jsv-license-settings1,4324.23133.64177.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_360-javasciptviewer-widget

Smoke tests 25% 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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 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_autorotate.php:3
    • > 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_notifier.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_license.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_index.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

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jsv-license-settings
    • > Network (severe)
    wp-content/plugins/360deg-javascript-viewer/admin/scss/jsv-360-admin.css?ver=1.6.15 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jsv-license-settings
    • > Network (severe)
    wp-content/plugins/360-jsv/admin/img/sign-130.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: 360 image, 360 product viewer, 360 product view, 360 product rotation, 360 view software...

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

The principal PHP file in "360 Javascript Viewer" v. 1.6.15 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,558 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP242062771,017
JavaScript44219251
Sass7323187
SVG20075
CSS25128

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.07
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods59
▷ Static methods23.39%
▷ Public methods4067.80%
▷ Protected methods00.00%
▷ Private methods1932.20%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants316.67%
▷ Class constants1583.33%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 4 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/copy_code.png23.31KB9.57KB▼ 58.96%
admin/img/first_image_select.png36.01KB13.67KB▼ 62.04%