10% panopress

Code Review | PanoPress

WordPress plugin PanoPress scored10%from 54 tests.

About plugin

  • Plugin page: panopress
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.7
  • WordPress version: 6.3.1
  • First release: Oct 16, 2012
  • Latest release: May 1, 2017
  • Number of updates: 33
  • Update frequency: every 50.3 days
  • Top authors: omercalev (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

4,000+ active /98,109 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/panopress/panopress.php+137
    Use of undefined constant PB_SETTINGS_BG_OPACITY - assumed 'PB_SETTINGS_BG_OPACITY' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.97MB] [CPU: ▼59.82ms] Passed 4 tests

Analyzing server-side resources used by PanoPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.48 ▼41.26
Dashboard /wp-admin2.05 ▼1.306.82 ▼60.50
Posts /wp-admin/edit.php2.05 ▼1.315.70 ▼43.35
Add New Post /wp-admin/post-new.php2.05 ▼3.847.21 ▼94.16
Media Library /wp-admin/upload.php2.05 ▼1.186.02 ▼27.49
PanoPress /wp-admin/options-general.php?page=panopress2.055.82

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

PanoPress: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲11413.17 ▼0.833.26 ▲1.2846.45 ▲1.61
Dashboard /wp-admin2,231 ▲374.86 ▼0.9499.83 ▼1.3041.45 ▼2.95
Posts /wp-admin/edit.php2,110 ▲72.04 ▲0.0339.38 ▼0.2835.39 ▼2.20
Add New Post /wp-admin/post-new.php1,532 ▼117.64 ▼5.45607.07 ▼17.9952.96 ▼1.46
Media Library /wp-admin/upload.php1,410 ▲104.21 ▲0.0298.17 ▼4.9644.38 ▲0.34
PanoPress /wp-admin/options-general.php?page=panopress1,1791.7127.9027.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/panopress/panopress.php+137
    Use of undefined constant PB_SETTINGS_BG_OPACITY - assumed 'PB_SETTINGS_BG_OPACITY' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=panopress
    • > Warning in wp-content/plugins/panopress/panopress.php+137
    Use of undefined constant PB_SETTINGS_BG_OPACITY - assumed 'PB_SETTINGS_BG_OPACITY' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=panopress
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=panopress
    • > Notice in wp-content/plugins/panopress/includes/admin.php+300
    Undefined index: advanced_open
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=panopress
    • > Notice in wp-content/plugins/panopress/includes/admin.php+206
    Undefined index: width
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=panopress
    • > Notice in wp-content/plugins/panopress/includes/admin.php+207
    Undefined index: height
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=panopress
    • > Warning in wp-content/plugins/panopress/includes/admin.php+219
    Illegal string offset 'box'
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=panopress
    • > Notice in wp-content/plugins/panopress/includes/admin.php+256
    Undefined index: viewer_dir
    • > GET request to /wp-admin/options-general.php?page=panopress
    • > Notice in wp-content/plugins/panopress/includes/admin.php+295
    Undefined index: css

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/panopress/krpano.php
    • > /wp-content/plugins/panopress/pano2vr.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/panopress/pano2vr.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/panopress/pano2vr.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/panopress/pano2vr.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/panopress/panopress.php:108
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/panopress/panopress.php on line 62
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/panopress/krpano.php on line 3
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/panopress/panopress.php on line 60
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/panopress/panopress.php on line 63
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/panopress/panopress.php on line 61
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/panopress/krpano.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: There are too many tags (52 tag instead of maximum 10)
The official readme.txt is a good inspiration

panopress/panopress.php 92% from 13 tests

The main file in "PanoPress" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 248 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,023 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP454215912
HTML102107
JavaScript3033
CSS1011

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants64
▷ Global constants64100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/get-flash.png2.58KB2.69KB0.00%
images/play.png2.53KB1.54KB▼ 39.17%
js/tinymce/button.png0.97KB0.13KB▼ 86.96%
images/pp-close.png1.44KB1.38KB▼ 4.34%
images/pp-nav.png1.66KB0.86KB▼ 48.35%