83% gpano

Code Review | gPano

WordPress plugin gPano scored83%from 54 tests.

About plugin

  • Plugin page: gpano
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3
  • WordPress version: 6.3.1
  • First release: Apr 7, 2017
  • Latest release: Jul 26, 2021
  • Number of updates: 9
  • Update frequency: every 174.4 days
  • Top authors: ifromussr (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,377 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.32ms] Passed 4 tests

A check of server-side resources used by gPano
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.08 ▼2.22
Dashboard /wp-admin3.39 ▲0.0953.37 ▲2.19
Posts /wp-admin/edit.php3.44 ▲0.0953.95 ▲7.56
Add New Post /wp-admin/post-new.php5.97 ▲0.0991.49 ▼8.32
Media Library /wp-admin/upload.php3.32 ▲0.0937.59 ▲3.06
Add New /wp-admin/post-new.php?post_type=gpano_vtour3.3546.75
Settings /wp-admin/edit.php?post_type=gpano_vtour&page=gpano-setup3.2738.72
Panoramas /wp-admin/edit.php?post_type=gpano_vtour3.3636.69

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
gpano_container
gpano_apikey
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for gPano
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲14813.37 ▼0.987.75 ▲5.7140.52 ▼5.19
Dashboard /wp-admin2,223 ▲585.55 ▼0.0587.81 ▼0.5639.55 ▼1.07
Posts /wp-admin/edit.php2,131 ▲342.03 ▲0.0536.66 ▲0.0632.93 ▲0.34
Add New Post /wp-admin/post-new.php1,552 ▲2123.25 ▲0.50691.53 ▲4.9853.96 ▼7.57
Media Library /wp-admin/upload.php1,431 ▲374.20 ▼0.0894.23 ▼7.4043.99 ▼3.14
Add New /wp-admin/post-new.php?post_type=gpano_vtour1,5102.5352.3559.74
Settings /wp-admin/edit.php?post_type=gpano_vtour&page=gpano-setup8572.0126.1330.62
Panoramas /wp-admin/edit.php?post_type=gpano_vtour1,1001.9031.6930.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • gpano_apikey
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • gpano_container
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/gpano/admin/settings.php
    • > /wp-content/plugins/gpano/admin/edit-panorama.php
    • > /wp-content/plugins/gpano/gpano.php
    • > /wp-content/plugins/gpano/admin/view/edit-panorama-metabox.php
    • > /wp-content/plugins/gpano/frontend/shortcode.php
    • > /wp-content/plugins/gpano/admin/view/edit-panorama-shortcode.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === gpano === )
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: Please add images for these screenshots: #3 (Hotspots in the panorama), #4 (Video example), #5 (Gallery example), #6 (Google Street View example)
You can look at the official readme.txt

gpano/gpano.php Passed 13 tests

"gPano" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
68 characters long description:
The plugin allow embed the Google street view panoramas to wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected895 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP69234790
JavaScript16092
CSS12013

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
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
Namespaces1
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected