62% wp-pano

Code Review | wp-pano

WordPress plugin wp-pano scored62%from 54 tests.

About plugin

  • Plugin page: wp-pano
  • Plugin version: 1.17
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 10, 2016
  • Latest release: Apr 19, 2021
  • Number of updates: 58
  • Update frequency: every 32.7 days
  • Top authors: ifromussr (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

600+ active /20,375 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.05ms] Passed 4 tests

Server-side resources used by wp-pano
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.00 ▼2.90
Dashboard /wp-admin3.46 ▲0.1550.28 ▲0.91
Posts /wp-admin/edit.php3.57 ▲0.2153.41 ▼1.20
Add New Post /wp-admin/post-new.php6.06 ▲0.1789.77 ▼16.99
Media Library /wp-admin/upload.php3.38 ▲0.1540.73 ▲4.10
WP-Pano /wp-admin/options-general.php?page=wp-pano-setup-page3.3332.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 41 new files
Database: 1 new table, 15 new options
New tables
wp_wppano_hotspots
New WordPress options
widget_recent-comments
theysaidso_admin_options
wppano_target_container
wppano_vtourpath
can_compress_scripts
wppano_vtourxml
wppano_db_version
wppano_posttype
widget_theysaidso_widget
wppano_vtourswf
...

Browser metrics Passed 4 tests

wp-pano: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲12513.81 ▼0.918.48 ▲6.8443.45 ▲2.16
Dashboard /wp-admin2,209 ▲295.63 ▲0.0488.90 ▼3.9437.94 ▼5.79
Posts /wp-admin/edit.php2,111 ▲82.00 ▼0.0240.83 ▼2.0335.14 ▼6.43
Add New Post /wp-admin/post-new.php6,325 ▲4,79919.03 ▼4.56942.37 ▲310.3156.78 ▲7.06
Media Library /wp-admin/upload.php1,411 ▲114.14 ▼0.08112.55 ▲10.0349.20 ▲1.61
WP-Pano /wp-admin/options-general.php?page=wp-pano-setup-page1,3401.7027.1855.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_wppano_hotspots
  • This plugin did not uninstall successfully, leaving 15 options in the database
    • wppano_vtourswf
    • user_script_after
    • wppano_db_version
    • can_compress_scripts
    • wppano_vtourxml
    • theysaidso_admin_options
    • wppano_posttype
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp-pano-setup-page
    • > Notice in wp-content/plugins/wp-pano/inc/view/admin-settings.php+83
    Uninitialized string offset: 0

SRP 0% 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
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-pano/wp-pano.php
    • > /wp-content/plugins/wp-pano/inc/front.php
    • > /wp-content/plugins/wp-pano/inc/admin.php
    • > /wp-content/plugins/wp-pano/inc/view/wp-pano-head.php
    • > /wp-content/plugins/wp-pano/inc/startxml.php
    • > /wp-content/plugins/wp-pano/inc/view/front-pano.php
    • > /wp-content/plugins/wp-pano/inc/view/admin-add-hotspots.php
    • > /wp-content/plugins/wp-pano/inc/db.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/wp-pano/templates/fixedwidth.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/wp-pano/templates/standard.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/wp-pano/templates/gallery.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/wp-pano/templates/fit-size.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/wp-pano/templates/thumbnail.php:1
    • > PHP Notice
      Undefined variable: xml_url in wp-content/plugins/wp-pano/inc/startxml.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/wp-pano/templates/longpage.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory() in wp-content/plugins/wp-pano/inc/view/admin-renderpano.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-pano/inc/view/admin-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/wp-pano/inc/view/admin-rendererror.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-pano === )
  • Requires at least: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

wp-pano/wp-pano.php Passed 13 tests

"wp-pano" version 1.17's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
The content manager for the krpano Panorama Viewer

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,251 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP1784381,062
JavaScript611490782
XML2290216
CSS2261191

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
xml/hs_info_title.png2.85KB0.27KB▼ 90.55%
xml/hs_gallery.png4.78KB1.70KB▼ 64.36%
xml/hs_video.png5.96KB2.02KB▼ 66.13%
xml/hs_photo.png5.34KB1.88KB▼ 64.81%
img/arrows-hover.png18.72KB0.57KB▼ 96.94%