89% lf-hiker

Code Review |

WordPress plugin scored89%from 54 tests.

About plugin

  • Plugin page: lf-hiker
  • Plugin version: 1.13.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.3-4.9
  • WordPress version: 6.3.1
  • First release: May 6, 2017
  • Latest release: Sep 30, 2018
  • Number of updates: 108
  • Update frequency: every 4.7 days
  • Top authors: epointal (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /11,097 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼9.01ms] Passed 4 tests

Analyzing server-side resources used by
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1339.72 ▲1.06
Dashboard /wp-admin3.39 ▲0.0449.94 ▼9.85
Posts /wp-admin/edit.php3.50 ▲0.1450.42 ▲2.64
Add New Post /wp-admin/post-new.php6.06 ▲0.1787.20 ▼12.71
Media Library /wp-admin/upload.php3.38 ▲0.1535.82 ▼14.53
Lf Hiker /wp-admin/options-general.php?page=lfh_options_page3.3631.02
About /wp-admin/admin.php?page=lfh_info3.3027.94
All gpx files /wp-admin/upload.php?mode=list&attachment-filter=post_mime_type%3Aapplication%2Fgpx%2Bxml&filter_action=Filter&paged=13.5139.35

Server storage [IO: ▲2.90MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • There were 1 file (0.86KB) illegally modified outside of "wp-content/plugins/lf-hiker/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 110 new files
Database: no new tables, 19 new options
New WordPress options
lfh_button_color
lfh_number_gpx_for_checkbox
lfh_download_gpx
lfh_background_sub
widget_recent-posts
can_compress_scripts
lfh_distance_unit
db_upgraded
lfh_background
lfh_step_min
...

Browser metrics Passed 4 tests

: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.20 ▼1.181.81 ▲0.2045.61 ▼2.94
Dashboard /wp-admin2,232 ▲415.79 ▲0.92108.82 ▼6.3873.53 ▲25.39
Posts /wp-admin/edit.php2,115 ▲262.01 ▲0.0040.00 ▲1.9736.30 ▼1.66
Add New Post /wp-admin/post-new.php1,706 ▲18624.45 ▲1.32642.32 ▼65.6852.21 ▼33.32
Media Library /wp-admin/upload.php1,419 ▲284.15 ▼0.0797.88 ▼18.7668.49 ▲18.40
Lf Hiker /wp-admin/options-general.php?page=lfh_options_page9422.0224.3940.48
About /wp-admin/admin.php?page=lfh_info8732.0227.1034.70
All gpx files /wp-admin/upload.php?mode=list&attachment-filter=post_mime_type%3Aapplication%2Fgpx%2Bxml&filter_action=Filter&paged=11,3321.8028.5833.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: gpx, hiker, track, map, leaflet...

lf-hiker/lf-hiker.php 92% from 13 tests

The main PHP file in "" ver. 1.13.0 adds more information about the plugin and also serves as the entry point for this plugin
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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected18,778 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript152,9413,78910,407
PHP242932892,635
CSS91551212,576
PO File68391,2091,839
LESS274141,199
SVG175087
JSON10035

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.38
▷ Minimum class complexity2.00
▷ Maximum class complexity43.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods124
▷ Static methods6653.23%
▷ Public methods8870.97%
▷ Protected methods32.42%
▷ Private methods3326.61%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
35 PNG files occupy 0.75MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/images/markers-plain.png7.76KB5.10KB▼ 34.23%
images/icons/marker.png0.48KB0.33KB▼ 31.84%
images/markers/pointS000063.png0.42KB0.32KB▼ 23.76%
css/images/markers-shadow@2x.png1.43KB1.56KB0.00%
css/images/markers-plain.png7.76KB5.10KB▼ 34.23%