72% google-map-with-fancybox-popup

Code Review | Google Map with FancyBox Popup

WordPress plugin Google Map with FancyBox Popup scored72%from 54 tests.

About plugin

  • Plugin page: google-map-with-f...
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.1
  • WordPress version: 6.3.1
  • First release: Apr 29, 2014
  • Latest release: Dec 1, 2022
  • Number of updates: 30
  • Update frequency: every 104.6 days
  • Top authors: gopiplus (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /13,558 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.98ms] Passed 4 tests

This is a short check of server-side resources used by Google Map with FancyBox Popup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0946.21 ▲6.01
Dashboard /wp-admin3.39 ▲0.0954.83 ▲3.74
Posts /wp-admin/edit.php3.50 ▲0.1548.48 ▼3.31
Add New Post /wp-admin/post-new.php5.97 ▲0.0893.27 ▼17.45
Media Library /wp-admin/upload.php3.31 ▲0.0838.34 ▲1.12
Google Map /wp-admin/options-general.php?page=google-map-with-fancybox-popup3.3236.55

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 41 new files
Database: 1 new table, 7 new options
New tables
wp_gmwfb_mapdetails
New WordPress options
can_compress_scripts
widget_google-map-with-fancybox-popup
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Google Map with FancyBox Popup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15215.98 ▲1.789.47 ▲7.3841.84 ▲3.39
Dashboard /wp-admin2,228 ▲257.29 ▲1.44157.96 ▲54.7043.91 ▲3.26
Posts /wp-admin/edit.php2,113 ▲133.48 ▲1.4855.17 ▲14.8733.70 ▼8.33
Add New Post /wp-admin/post-new.php1,539 ▲826.15 ▲3.06518.27 ▼168.0652.34 ▼11.85
Media Library /wp-admin/upload.php1,416 ▲166.45 ▲2.24116.65 ▲10.7244.54 ▼1.90
Google Map /wp-admin/options-general.php?page=google-map-with-fancybox-popup9163.6143.4428.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_google-map-with-fancybox-popup
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/google-map-with-fancybox-popup/google-map-with-fancybox-popup.php
    • > /wp-content/plugins/google-map-with-fancybox-popup/page/gmwfb-add.php
    • > /wp-content/plugins/google-map-with-fancybox-popup/classes/gmwfb-loadmap.php
    • > /wp-content/plugins/google-map-with-fancybox-popup/page/gmwfb-show.php
    • > /wp-content/plugins/google-map-with-fancybox-popup/classes/gmwfb-query.php
    • > /wp-content/plugins/google-map-with-fancybox-popup/page/gmwfb-edit.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/google-map-with-fancybox-popup/classes/gmwfb-register.php:209
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/google-map-with-fancybox-popup/classes/gmwfb-stater.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=google-map-with-fancybox-popup
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key=AIzaSyA2l4SJrBt-_rrExNUyno16XvbW6gQNBug 210: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"
    • > GET request to /wp-admin/options-general.php?page=google-map-with-fancybox-popup
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key=AIzaSyA2l4SJrBt-_rrExNUyno16XvbW6gQNBug 139:311 "google.maps.event.addDomListener() is deprecated, use the standard\naddEventListener() method instead:\nhttps://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener\nThe feature will continue to work and there is no plan to decommission\nit."
    • > GET request to /wp-admin/options-general.php?page=google-map-with-fancybox-popup
    • > Javascript (severe) in unknown
    https://maps.googleapis.com/maps/api/js?key=AIzaSyA2l4SJrBt-_rrExNUyno16XvbW6gQNBug 128:473 Uncaught eca: Map: Expected mapDiv of type HTMLElement but was passed null.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: google map, fancybox, popup

google-map-with-fancybox-popup/google-map-with-fancybox-popup.php 92% from 13 tests

The principal PHP file in "Google Map with FancyBox Popup" v. 3.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 206 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected6,648 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,8106204,035
PHP10117841,134
CSS416533934
PO File5220260519
SQL10025
HTML1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.40
▷ Minimum class complexity4.00
▷ Maximum class complexity21.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods15
▷ Static methods1173.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
4 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/fancy_loading.png9.96KB6.30KB▼ 36.67%
inc/fancybox-y.png0.17KB0.24KB0.00%
inc/fancybox-x.png0.20KB0.31KB0.00%
inc/fancybox.png14.93KB8.47KB▼ 43.29%