73% google-maps-photo-gallery

Code Review | Google Maps Photo Gallery

WordPress plugin Google Maps Photo Gallery scored 73% 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: 6.3.1
  • 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 / 5,146 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼1.19MB] [CPU: ▼43.43ms] Passed 4 tests

Analyzing server-side resources used by Google Maps Photo Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6814.04 ▼30.98
Dashboard /wp-admin2.82 ▼0.4916.44 ▼32.83
Posts /wp-admin/edit.php2.82 ▼0.5418.08 ▼31.39
Add New Post /wp-admin/post-new.php2.82 ▼3.0717.27 ▼78.51
Media Library /wp-admin/upload.php2.82 ▼0.4118.04 ▼18.64
Google Maps Photo Gallery /wp-admin/options-general.php?page=googlemaps_photo_gallery2.8218.66

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Google Maps Photo Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲19114.61 ▲0.2332.27 ▲30.2437.79 ▼9.71
Dashboard /wp-admin2,225 ▲374.86 ▼0.17103.31 ▼13.4843.48 ▼0.97
Posts /wp-admin/edit.php2,107 ▲182.06 ▲0.0441.41 ▲4.2639.87 ▲4.78
Add New Post /wp-admin/post-new.php1,552 ▲3823.30 ▲5.79637.19 ▼50.7750.43 ▼11.05
Media Library /wp-admin/upload.php1,404 ▲194.31 ▲0.13109.49 ▲7.7347.86 ▲2.51
Google Maps Photo Gallery /wp-admin/options-general.php?page=googlemaps_photo_gallery8052.0629.8031.77

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
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/google-maps-photo-gallery/googlemaps-photo-gallery.php+43
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Display photo gallery on Google Maps), #2 (Zoom in image with lightbox)
The official readme.txt might help

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

The entry point to "Google Maps Photo Gallery" version 1.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; 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 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin22,401 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript73,1001,35720,788
CSS5118521,244
PHP17957239
Markdown249085
PO File1161845

PHP code Passed 2 tests

A short 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.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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 images were found in this plugin