46% geotagged-media

Code Review | Geotagged Media

WordPress plugin Geotagged Media scored46%from 54 tests.

About plugin

  • Plugin page: geotagged-media
  • Plugin version: 0.3.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.0
  • WordPress version: 6.3.1
  • First release: Apr 30, 2019
  • Latest release: Mar 7, 2020
  • Number of updates: 25
  • Update frequency: every 12.5 days
  • Top authors: digitalfisherman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,617 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.69MB] [CPU: ▼31.14ms] Passed 4 tests

Server-side resources used by Geotagged Media
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2139.94 ▼3.01
Dashboard /wp-admin3.26 ▼0.0530.31 ▼14.92
Posts /wp-admin/edit.php3.26 ▼0.1027.08 ▼24.76
Add New Post /wp-admin/post-new.php3.26 ▼2.6322.95 ▼76.29
Media Library /wp-admin/upload.php3.26 ▲0.0324.75 ▼8.57
Geotagged media /wp-admin/upload.php?page=gtm3.2626.72
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=attachment3.2621.33
Geotagged Media /wp-admin/options-general.php?page=gtm-admin-options3.2626.32
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment3.2623.53

Server storage [IO: ▲6.96MB] [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: 66 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-comments
category_children
widget_recent-posts
gtm_options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Geotagged Media
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,071 ▲31417.02 ▲2.6522.45 ▲20.4134.91 ▼10.16
Dashboard /wp-admin2,323 ▲1416.99 ▲2.13156.11 ▲53.6942.20 ▼0.36
Posts /wp-admin/edit.php2,190 ▲1014.04 ▲2.0157.53 ▲13.9431.55 ▼3.09
Add New Post /wp-admin/post-new.php1,786 ▲25824.98 ▲6.60616.85 ▲17.0926.82 ▼33.66
Media Library /wp-admin/upload.php1,508 ▲1236.50 ▲2.26124.02 ▲28.4146.34 ▲2.73
Geotagged media /wp-admin/upload.php?page=gtm9773.7356.3726.89
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=attachment1,4333.8862.4334.39
Geotagged Media /wp-admin/options-general.php?page=gtm-admin-options1,0073.8658.8231.40
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment1,5493.7656.2931.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • category_children
    • can_compress_scripts
    • gtm_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/upload.php?page=gtm
    • > Notice in wp-content/plugins/geotagged-media/gtm_dash.php+365
    Undefined index: action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gtm-admin-options
    • > Notice in wp-content/plugins/geotagged-media/gtm_settings_page.php+43
    Undefined index: key_bingmaps
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gtm-admin-options
    • > Notice in wp-content/plugins/geotagged-media/gtm_settings_page.php+48
    Undefined index: key_thunderforest
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gtm-admin-options
    • > Notice in wp-content/plugins/geotagged-media/gtm_settings_page.php+54
    Undefined index: key_mapbox

SRP 0% 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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/geotagged-media/gtm_dash_page.php
    • > /wp-content/plugins/geotagged-media/gtm_media_details.php
  • 23× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/geotagged-media/gtm_media_details.php on line 19
    • > PHP Warning
      include_once(vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/geotagged-media/gtm_delete_exif.php on line 3
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/geotagged-media/gtm_media_details.php on line 26
    • > PHP Warning
      require_once(vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/geotagged-media/gtm_geocode_lib.php on line 3
    • > PHP Notice
      Undefined variable: gtm_options in wp-content/plugins/geotagged-media/gtm_settings_page.php on line 54
    • > PHP Fatal error
      require_once(): Failed opening required '../../..wp-includes/version.php' (include_path='.:/usr/share/php') in wp-load.php on line 62
    • > PHP Fatal error
      require_once(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/geotagged-media/gtm_geocode_lib.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/geotagged-media/gtm_settings_page.php:59
    • > PHP Warning
      include_once(vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/geotagged-media/gtm_store_exif.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/geotagged-media/gtm_settings_page.php on line 54

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment
    • > Javascript (severe) in unknown
    /wp-content/plugins/geotagged-media/bootstrap/bootstrap-3.3.6.min.js?ver=3.3.6 5:215 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment
    • > Javascript (severe) in unknown
    /wp-content/plugins/geotagged-media/gtm.js?ver=6.3.1 77:4 Uncaught TypeError: $ is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: maps osm openlayers geotag exif dashboard

geotagged-media/gtm_plugin_main.php 77% from 13 tests

"Geotagged Media" version 0.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • 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: Name the main plugin file the same as the plugin slug ("geotagged-media.php" instead of "gtm_plugin_main.php")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("digfish/gtm")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
These items require your attention
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .mst - Windows Installer Setup Transform File in Windows
      • wp-content/plugins/geotagged-media/gtm.mst
21,124 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript125,5647,13317,160
CSS5115422,363
PHP1734,97155,6791,451
SVG111141
JSON1009

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions86
▷ Named functions7587.21%
▷ Anonymous functions1112.79%
Constants3
▷ Global constants3100.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
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
leaflet/images/layers-2x.png1.23KB1.67KB0.00%
leaflet/images/marker-icon-2x.png2.41KB2.52KB0.00%
assets/icon-128x128.png4.10KB2.50KB▼ 38.90%
leaflet/images/marker-shadow.png0.60KB1.16KB0.00%
leaflet/images/layers.png0.68KB1.05KB0.00%