78% trackserver

Code Review | Trackserver

WordPress plugin Trackserver scored 78% from 54 tests.

About plugin

  • Plugin page: trackserver
  • Plugin version: 5.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Feb 2, 2015
  • Latest release: Jul 18, 2023
  • Number of updates: 234
  • Update frequency: every 13.2 days
  • Top authors: tinuzz (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

600+ active / 16,209 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.74MB] [CPU: ▲1.53ms] Passed 4 tests

A check of server-side resources used by Trackserver
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4540.97 ▲0.87
Dashboard /wp-admin4.14 ▲0.8451.67 ▼0.36
Posts /wp-admin/edit.php4.19 ▲0.8352.17 ▲5.46
Add New Post /wp-admin/post-new.php6.72 ▲0.8491.42 ▲0.27
Media Library /wp-admin/upload.php4.06 ▲0.8339.05 ▲5.34
Options /wp-admin/admin.php?page=trackserver-options3.9635.84
Embedded maps /wp-admin/edit.php?post_type=tsmap4.1038.92
Trackserver /wp-admin/options-general.php?page=trackserver-admin-menu3.9635.63

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 114 new files
Database: 2 new tables, 7 new options
New tables
wp_ts_tracks
wp_ts_locations
New WordPress options
trackserver_options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Trackserver
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲9014.48 ▲0.101.76 ▼0.2938.89 ▼1.12
Dashboard /wp-admin2,250 ▲625.85 ▲0.96101.94 ▼15.9979.09 ▲32.51
Posts /wp-admin/edit.php2,133 ▲442.00 ▲0.0036.74 ▼0.9632.61 ▲0.19
Add New Post /wp-admin/post-new.php1,551 ▲3717.74 ▲0.32761.06 ▲154.4351.47 ▲1.28
Media Library /wp-admin/upload.php1,423 ▲414.11 ▼0.15106.70 ▲6.4067.87 ▲26.16
Options /wp-admin/admin.php?page=trackserver-options1,2132.1328.5833.43
Embedded maps /wp-admin/edit.php?post_type=tsmap1,1051.9235.0129.66
Trackserver /wp-admin/options-general.php?page=trackserver-admin-menu1,2122.0726.5532.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 14× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/trackserver/class-trackserver-location.php
    • > /wp-content/plugins/trackserver/class-trackserver-shortcode.php
    • > /wp-content/plugins/trackserver/class-trackserver-ulogger.php
    • > /wp-content/plugins/trackserver/class-trackserver-db.php
    • > /wp-content/plugins/trackserver/class-trackserver-owntracks.php
    • > /wp-content/plugins/trackserver/embedded-404.php
    • > /wp-content/plugins/trackserver/class-trackserver-trackme.php
    • > /wp-content/plugins/trackserver/class-trackserver-settings.php
    • > /wp-content/plugins/trackserver/class-trackserver-getrequest.php
    • > /wp-content/plugins/trackserver/class-trackserver-profile.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/trackserver/tests/bootstrap.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/trackserver/tests/bootstrap.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/trackserver/tracks-list-table.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_title() in wp-content/plugins/trackserver/embedded-template.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The track management page in the WordPress admin), #2 (Configuration of OruxMaps for use with Trackserver / WordPress)
The official readme.txt is a good inspiration

trackserver/trackserver.php Passed 13 tests

The principal PHP file in "Trackserver" v. 5.0.2 is loaded by WordPress automatically on each request
49 characters long description:
GPS Track Server for TrackMe, OruxMaps and others

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected29,873 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript155,9827,56521,410
PHP198991,4404,990
PO File24175681,274
XSD25723939
CSS66528679
Markdown41390412
Bourne Shell121799
YAML18038
XML23127
SVG1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity42.50
▷ Minimum class complexity4.00
▷ Maximum class complexity187.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods244
▷ Static methods72.87%
▷ Public methods15463.11%
▷ Protected methods00.00%
▷ Private methods9036.89%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
33 PNG files occupy 2.22MB with 1.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/gpslogger-howto.png137.93KB49.27KB▼ 64.28%
img/traccar-logo.png6.23KB3.07KB▼ 50.71%
img/ulogger-logo.png4.03KB2.51KB▼ 37.82%
img/osmand-settings.png151.68KB59.42KB▼ 60.82%
img/phonetrack-logo.png11.63KB5.38KB▼ 53.72%