82% wp-google-street-view-shortcode

Code Review | Shortcode for Google Street View

WordPress plugin Shortcode for Google Street View scored 82% from 54 tests.

About plugin

  • Plugin page: wp-google-street-...
  • Plugin version: 0.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.9
  • WordPress version: 5.9.2
  • First release: Jan 1, 2018
  • Latest release: Jan 24, 2018
  • Number of updates: 11
  • Update frequency: every 2.2 days
  • Top authors: AntiochInteractive (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active / 4,006 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼314.92ms] Passed 4 tests

Server-side resources used by Shortcode for Google Street View
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0760.11 ▲3.33
Dashboard /wp-admin3.48 ▲0.0739.97 ▼8.02
Posts /wp-admin/edit.php3.70 ▲0.0746.18 ▼19.37
Add New Post /wp-admin/post-new.php6.94 ▼0.03105.32 ▼1,235.09
Media Library /wp-admin/upload.php3.36 ▲0.0631.70 ▲2.79
GSV Shortcode /wp-admin/options-general.php?page=gsvadmin3.3331.60

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Shortcode for Google Street View: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,799 ▲5514.81 ▼0.316.88 ▲0.762.82 ▲0.38
Dashboard /wp-admin2,896 ▲426.14 ▼0.05116.73 ▼33.71156.45 ▼9.99
Posts /wp-admin/edit.php2,709 ▲393.24 ▲0.1963.81 ▼21.32140.03 ▼20.90
Add New Post /wp-admin/post-new.php1,677 ▼3420.45 ▼1.35446.33 ▼4.23171.63 ▲11.64
Media Library /wp-admin/upload.php1,713 ▲155.53 ▲0.04177.67 ▲42.37225.44 ▲36.33
GSV Shortcode /wp-admin/options-general.php?page=gsvadmin1,0732.5055.59131.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-google-street-view-shortcode/gsv.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: heading in wp-content/plugins/wp-google-street-view-shortcode/gsv.php on line 23
    • > PHP Notice
      Undefined index: key in wp-content/plugins/wp-google-street-view-shortcode/gsv.php on line 2
    • > PHP Notice
      Undefined index: zoom in wp-content/plugins/wp-google-street-view-shortcode/gsv.php on line 25
    • > PHP Notice
      Undefined index: lat in wp-content/plugins/wp-google-street-view-shortcode/gsv.php on line 18
    • > PHP Notice
      Undefined index: pitch in wp-content/plugins/wp-google-street-view-shortcode/gsv.php on line 24
    • > PHP Notice
      Undefined index: lng in wp-content/plugins/wp-google-street-view-shortcode/gsv.php on line 18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=gsvadmin
    • > Network (severe)
    http://maps.google.com/maps?file=api&key=&callback=mapsCallback - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=gsvadmin
    • > Network (severe)
    http://maps.googleapis.com/maps/api/streetview?size=20x20&location=32.755607226325,-97.33214383036301&fov=90&heading=146.0375056698473&pitch=0.9564023077946047&key= - Failed to load resource: the server responded with a status of 403 (Forbidden)


Plugin configuration 90% from 29 tests

readme.txt Passed 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
9 plugin tags: maps, google, street, address, panorama...

wp-google-street-view-shortcode/gsv-shortcode.php 77% from 13 tests

This is the main PHP file of "Shortcode for Google Street View" version 0.5.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-google-street-view-shortcode.php" instead of "gsv-shortcode.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin819 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions13100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
pegman.png1.41KB0.45KB▼ 67.94%