83% google-maps-photo-gallery

Code Review | Google Maps Photo Gallery

WordPress plugin Google Maps Photo Gallery scored 83% from 54 tests.

About plugin

  • Plugin page: google-maps-photo...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 5.9.2
  • First release: Jan 7, 2014
  • Latest release: Jun 29, 2019
  • Number of updates: 24
  • Update frequency: every 83.3 days
  • Top authors: sysbird (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active / 4,717 total downloads


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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.45MB] [CPU: ▼328.69ms] Passed 4 tests

Server-side resources used by Google Maps Photo Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.02 ▼0.5218.87 ▼28.09
Dashboard /wp-admin2.94 ▼0.5014.32 ▼19.24
Posts /wp-admin/edit.php2.94 ▼0.7313.64 ▼25.01
Add New Post /wp-admin/post-new.php2.94 ▼4.0614.20 ▼1,242.40
Media Library /wp-admin/upload.php2.94 ▼0.3814.90 ▼10.17
Google Maps Photo Gallery /wp-admin/options-general.php?page=googlemaps_photo_gallery2.9514.87

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google Maps Photo Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,948 ▲19417.48 ▲1.8321.19 ▲14.412.65 ▲0.16
Dashboard /wp-admin2,916 ▲586.15 ▼0.12120.74 ▼19.50156.75 ▼5.46
Posts /wp-admin/edit.php2,679 ▼93.24 ▲0.0063.76 ▲2.17133.38 ▼12.00
Add New Post /wp-admin/post-new.php1,678 ▼2016.02 ▼6.31417.20 ▼15.05156.10 ▼4.77
Media Library /wp-admin/upload.php1,725 ▲275.53 ▼0.03142.16 ▼11.26183.99 ▼2.96
Google Maps Photo Gallery /wp-admin/options-general.php?page=googlemaps_photo_gallery1,0312.3855.84112.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/google-maps-photo-gallery/googlemaps-photo-gallery.php+43
    Trying to access array offset on value of type bool

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=googlemaps_photo_gallery
    • > Notice in wp-content/plugins/google-maps-photo-gallery/googlemaps-photo-gallery.php+43
    Trying to access array offset on value of type bool

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Display photo gallery on Google Maps), #2 (Zoom in image with lightbox)
The official readme.txt is a good inspiration

google-maps-photo-gallery/googlemaps-photo-gallery.php 85% from 13 tests

The primary PHP file in "Google Maps Photo Gallery" version 1.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("google-maps-photo-gallery.php" instead of "googlemaps-photo-gallery.php")

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
There were no executable files found in this plugin22,401 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PO File1161845

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
No PNG images were found in this plugin