68% wp-google-street-view

Code Review | WP Google Street View (with 360° virtual tour) & Google maps + Local SEO

WordPress plugin WP Google Street View (with 360° virtual tour) & Google maps + Local SEO scored68%from 54 tests.

About plugin

  • Plugin page: wp-google-street-...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: May 27, 2020
  • Latest release: Aug 25, 2023
  • Number of updates: 25
  • Update frequency: every 47.4 days
  • Top authors: pagup (80%)The-Rock (24%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /6,066 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 gracefully, with no errors

Server metrics [RAM: ▲0.62MB] [CPU: ▲4.53ms] Passed 4 tests

This is a short check of server-side resources used by WP Google Street View (with 360° virtual tour) & Google maps + Local SEO
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6241.72 ▲0.70
Dashboard /wp-admin3.93 ▲0.6355.70 ▲7.06
Posts /wp-admin/edit.php3.98 ▲0.6250.53 ▲4.49
Add New Post /wp-admin/post-new.php6.48 ▲0.59110.41 ▲20.99
Media Library /wp-admin/upload.php3.85 ▲0.6339.10 ▲5.88
All Items /wp-admin/edit.php?post_type=wpgsv3.9350.89
Add New /wp-admin/post-new.php?post_type=wpgsv3.9974.28
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0640.38
Settings /wp-admin/edit.php?post_type=wpgsv&page=settings3.9645.23

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Google Street View (with 360° virtual tour) & Google maps + Local SEO
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲11813.71 ▼0.671.80 ▼0.3533.33 ▼12.75
Dashboard /wp-admin2,292 ▲1154.90 ▲0.00101.80 ▼1.0839.41 ▼10.62
Posts /wp-admin/edit.php2,178 ▲892.05 ▲0.0540.94 ▲1.5639.63 ▲3.80
Add New Post /wp-admin/post-new.php1,586 ▲6623.26 ▲0.15652.53 ▼56.1273.59 ▲8.80
Media Library /wp-admin/upload.php1,478 ▲934.22 ▼0.01111.70 ▲10.9848.80 ▲2.75
All Items /wp-admin/edit.php?post_type=wpgsv1,3394.2381.8439.75
Add New /wp-admin/post-new.php?post_type=wpgsv2,6707.00136.02120.02
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1461.8625.4228.66
Settings /wp-admin/edit.php?post_type=wpgsv&page=settings1,2773.9647.60100.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-google-street-view/wp-google-street-view.php+138
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_recent-posts
    • fs_active_plugins
    • widget_theysaidso_widget
    • fs_accounts

Smoke tests 50% 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 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
The following issues need your attention
  • 21× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-google-street-view/admin/inc/assets.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-google-street-view/admin/inc/settings_side.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WPGSV_Notice' not found in wp-content/plugins/wp-google-street-view/admin/inc/tabs/styles.php:4
    • > PHP Warning
      Use of undefined constant WPGSV_PLUGIN_PATH - assumed 'WPGSV_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-google-street-view/admin/settings.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-google-street-view/admin/inc/settings_faq.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-google-street-view/admin/metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-google-street-view/admin/inc/tabs/layers.php:4
    • > PHP Warning
      require(WPGSV_PLUGIN_PATH/admin/inc/settings_notices.php): failed to open stream: No such file or directory in wp-content/plugins/wp-google-street-view/admin/settings.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-google-street-view/admin/inc/metabox_form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-google-street-view/admin/inc/settings_form.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpgsv&page=settings
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?libraries=places&key&ver=6.3.1 234:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #1, #10, #11, #2, #3, #4, #5, #6, #7, #8, #9 in wp-google-street-view/assets to your readme.txt
The official readme.txt is a good inspiration

wp-google-street-view/wp-google-street-view.php Passed 13 tests

"WP Google Street View (with 360° virtual tour) & Google maps + Local SEO" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
130 characters long description:
The WP Google Street View allows you to embed Google street View (with virtual tour) & Google Maps maps with high quality markers.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected48,708 lines of code in 192 files:
LanguageFilesBlank linesComment linesLines of code
PHP1458,62217,30034,602
PO File213,1503,31812,067
JavaScript9131931,423
CSS173253616

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity80.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes56
▷ Abstract classes23.57%
▷ Concrete classes5496.43%
▷ Final classes00.00%
Methods1,278
▷ Static methods21016.43%
▷ Public methods88969.56%
▷ Protected methods171.33%
▷ Private methods37229.11%
Functions122
▷ Named functions122100.00%
▷ Anonymous functions00.00%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
23 PNG files occupy 1.46MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/marker/marker3.png1.69KB1.23KB▼ 27.33%
assets/img/marker/marker2.png1.97KB1.40KB▼ 29.07%
assets/img/default.png57.79KB55.35KB▼ 4.22%
vendor/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/img/icon.png24.65KB11.23KB▼ 54.43%