78% gps-plotter

Code Review | Gps Plotter

WordPress plugin Gps Plotter scored78%from 54 tests.

About plugin

  • Plugin page: gps-plotter
  • Plugin version: 5.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 13, 2018
  • Latest release: Aug 15, 2023
  • Number of updates: 47
  • Update frequency: every 41.5 days
  • Top authors: Chilifide (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

200+ active /6,749 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.05ms] Passed 4 tests

A check of server-side resources used by Gps Plotter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.47 ▲0.46
Dashboard /wp-admin3.31 ▲0.0045.42 ▼8.90
Posts /wp-admin/edit.php3.36 ▲0.0045.27 ▲2.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.77 ▼14.29
Media Library /wp-admin/upload.php3.23 ▲0.0035.63 ▲3.66

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Gps Plotter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.49 ▲0.191.95 ▼0.0943.49 ▲0.81
Dashboard /wp-admin2,206 ▲215.85 ▼0.01107.26 ▼7.4940.73 ▼5.49
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0439.58 ▼7.1835.02 ▲0.07
Add New Post /wp-admin/post-new.php1,534 ▲1223.28 ▲0.18632.42 ▼0.9260.22 ▲8.23
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.04106.18 ▲8.8846.65 ▲3.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/gps-plotter/templates/shortcode-gpsplotter-map.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gps-plotter/admin/views/options.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
9 plugin tags: phone, map, plotter, track, google...

gps-plotter/gpsplotter.php 77% from 13 tests

The main PHP script in "Gps Plotter" version 5.2.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 216 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("gps-plotter.php" instead of "gpsplotter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin9,010 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript72,3946617,524
CSS57318783
PHP11201471703

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity8.50
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods28
▷ Static methods310.71%
▷ Public methods2278.57%
▷ Protected methods414.29%
▷ Private methods27.14%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/images/coolshadow_small.png0.43KB0.52KB0.00%
public/assets/images/coolred_small.png0.46KB0.50KB0.00%
public/assets/js/leaflet-0.7.5/images/marker-icon.png1.71KB1.56KB▼ 8.59%
public/assets/images/coolgreen2_small.png3.59KB0.50KB▼ 86.13%
public/assets/js/leaflet-0.7.5/images/marker-icon-2x.png3.94KB2.53KB▼ 35.71%