73% panorama

Code Review | Panorama Viewer - 360 Degree Image + Video Viewer

WordPress plugin Panorama Viewer - 360 Degree Image + Video Viewer scored73%from 54 tests.

About plugin

  • Plugin page: panorama
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 14, 2021
  • Latest release: Sep 20, 2023
  • Number of updates: 53
  • Update frequency: every 16.9 days
  • Top authors: abuhayat (45.28%)shehabulislam (26.42%)srabonr (22.64%)btechnologies (11.32%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active /17,305 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲5.36MB] [CPU: ▲37.18ms] 75% from 4 tests

A check of server-side resources used by Panorama Viewer - 360 Degree Image + Video Viewer
Please fix the following
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.36MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.88 ▲5.4290.43 ▲49.73
Dashboard /wp-admin8.90 ▲5.5585.42 ▲18.36
Posts /wp-admin/edit.php8.90 ▲5.5486.63 ▲32.53
Add New Post /wp-admin/post-new.php10.80 ▲4.91151.22 ▲48.08
Media Library /wp-admin/upload.php8.90 ▲5.6788.92 ▲50.77
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius8.9073.12

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 385 new files
Database: no new tables, 9 new options
New WordPress options
fs_active_plugins
fs_accounts
fs_debug_mode
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Panorama Viewer - 360 Degree Image + Video Viewer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲11013.35 ▼0.861.76 ▲0.1234.01 ▼6.49
Dashboard /wp-admin2,256 ▲535.85 ▲0.92116.78 ▲6.9546.62 ▲4.44
Posts /wp-admin/edit.php2,139 ▲362.04 ▼0.0137.83 ▼2.6139.22 ▲0.51
Add New Post /wp-admin/post-new.php1,549 ▲2322.33 ▲4.62594.14 ▼111.4746.86 ▼19.25
Media Library /wp-admin/upload.php1,435 ▲414.28 ▲0.02102.85 ▼2.0548.12 ▲3.74
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,1032.1029.0329.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/panorama/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 9 options
    • theysaidso_admin_options
    • fs_accounts
    • widget_recent-comments
    • db_upgraded
    • fs_debug_mode
    • fs_active_plugins
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/panorama/admin/ads/submenu.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/panorama/public/shortcode/shortcode.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/panorama/inc/Woocommerce/config.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% 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
5 plugin tags: krpano, 3d, panorama, 360 degree, virtual tour

panorama/panorama.php 77% from 13 tests

This is the main PHP file of "Panorama Viewer - 360 Degree Image + Video Viewer" version 1.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 155 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected79,204 lines of code in 306 files:
LanguageFilesBlank linesComment linesLines of code
PHP21811,59218,87050,195
JavaScript181,3915978,753
Sass211,43537,983
PO File203,1983,5916,500
CSS254015305,541
Markdown1680214
XML13016
SVG2002

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity51.72
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.96
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes118
▷ Abstract classes43.39%
▷ Concrete classes11496.61%
▷ Final classes00.00%
Methods1,536
▷ Static methods24616.02%
▷ Public methods1,14474.48%
▷ Protected methods171.11%
▷ Private methods37524.41%
Functions133
▷ Named functions13198.50%
▷ Anonymous functions21.50%
Constants150
▷ Global constants10368.67%
▷ Class constants4731.33%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/img/logo.png17.43KB8.45KB▼ 51.52%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
inc/csf/assets/images/checkerboard.png2.29KB2.54KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%