72% runners-log

Code Review | Runners Log

WordPress plugin Runners Log scored72%from 54 tests.

About plugin

  • Plugin page: runners-log
  • Plugin version: 3.9.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.9.8
  • WordPress version: 6.3.1
  • First release: Jan 1, 2010
  • Latest release: Aug 15, 2018
  • Number of updates: 168
  • Update frequency: every 18.8 days
  • Top authors: frold (86.31%)TheRealEyeless (11.9%)jaredatch (2.38%)michaellasmanis (1.19%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /10,676 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.32MB] [CPU: ▼18.13ms] Passed 4 tests

Analyzing server-side resources used by Runners Log
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3841.50 ▼3.30
Dashboard /wp-admin3.67 ▲0.3347.33 ▼9.76
Posts /wp-admin/edit.php3.79 ▲0.4347.95 ▲3.09
Add New Post /wp-admin/post-new.php3.52 ▼2.3634.56 ▼60.89
Media Library /wp-admin/upload.php3.60 ▲0.3736.89 ▲1.42
V02max Calculator /wp-admin/admin.php?page=runners-log-v02max3.6133.78
Coverter Toolbox /wp-admin/admin.php?page=runners-log-converter-toolbox3.6732.84
Race Time Calc. /wp-admin/admin.php?page=runners-log-vdot-race-time3.7631.92
HR Training Zones /wp-admin/admin.php?page=runners-log-training-zones3.6233.16
Training Pace Calc. /wp-admin/admin.php?page=runners-log-vdot-training-pace3.8232.14
Runners Log /wp-admin/admin.php?page=runners-log3.6931.15
Weight Change Effect /wp-admin/admin.php?page=runners-log-weight-change-effect3.6733.61
Body Mass Index /wp-admin/admin.php?page=runners-log-body-mass-index3.5734.25

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 30 new files
Database: 1 new table, 34 new options
New tables
wp_gear
New WordPress options
runnerslog_show_speed
runnerslog_show_time
runnerslog_show_speedperdistance
runnerslog_cadence
widget_recent-comments
widget_theysaidso_widget
runnerslog_show_distance2011
runnerslog_show_distance2016
runnerslog_show_distance2017
runnerslog_show_cadence
...

Browser metrics Passed 4 tests

Checking browser requirements for Runners Log
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲11913.58 ▼0.796.32 ▲4.2941.95 ▼1.37
Dashboard /wp-admin2,267 ▲795.03 ▲0.14110.34 ▼7.5741.74 ▼5.86
Posts /wp-admin/edit.php2,158 ▲692.39 ▲0.4235.23 ▼2.8133.50 ▼3.05
Add New Post /wp-admin/post-new.php6,333 ▲4,80521.82 ▼1.51864.34 ▲228.8066.07 ▲15.19
Media Library /wp-admin/upload.php1,456 ▲744.35 ▲0.1597.92 ▼3.8146.76 ▲1.30
V02max Calculator /wp-admin/admin.php?page=runners-log-v02max1,5951.9527.5539.47
Coverter Toolbox /wp-admin/admin.php?page=runners-log-converter-toolbox1,0652.0827.8131.72
Race Time Calc. /wp-admin/admin.php?page=runners-log-vdot-race-time8881.9627.9632.13
HR Training Zones /wp-admin/admin.php?page=runners-log-training-zones8451.9624.6826.32
Training Pace Calc. /wp-admin/admin.php?page=runners-log-vdot-training-pace9881.9726.2228.85
Runners Log /wp-admin/admin.php?page=runners-log1,4271.9627.6630.72
Weight Change Effect /wp-admin/admin.php?page=runners-log-weight-change-effect8961.9726.4930.68
Body Mass Index /wp-admin/admin.php?page=runners-log-body-mass-index8721.9525.2427.36

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 33 options
    • runnerslog_show_cadence
    • runnerslog_show_garminmap
    • runnerslog_show_speedperdistance
    • runnerslog_show_distance2012
    • runnerslog_show_distance2011
    • theysaidso_admin_options
    • runnerslog_show_distance2018
    • can_compress_scripts
    • runnerslog_show_distance2010
    • runnerslog_show_distance2013
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=runners-log-weight-change-effect
    • > Notice in wp-content/plugins/runners-log/Includes/runnerslog_weight_change_effect.php+19
    Undefined index: runnerslog_op_hidden
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=runners-log-body-mass-index
    • > Warning in wp-content/plugins/runners-log/Includes/runnerslog_body_mass_index.php+49
    Use of undefined constant meters - assumed 'meters' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=runners-log-v02max
    • > Warning in wp-content/plugins/runners-log/Includes/runnerslog_v02max.php+57
    Use of undefined constant male - assumed 'male' (this will throw an Error in a future version of PHP)
  • 31 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=runners-log-weight-change-effect
    • > Warning in wp-content/plugins/runners-log/Includes/runnerslog_weight_change_effect.php+63
    Use of undefined constant RUNNERSLOG - assumed 'RUNNERSLOG' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=runners-log-weight-change-effect
    • > Notice in wp-content/plugins/runners-log/Includes/runnerslog_weight_change_effect.php+88
    Undefined offset: 1
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=runners-log-weight-change-effect
    • > Notice in wp-content/plugins/runners-log/Includes/runnerslog_weight_change_effect.php+88
    Undefined offset: 2
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=runners-log-weight-change-effect
    • > Notice in wp-content/plugins/runners-log/Includes/runnerslog_weight_change_effect.php+211
    Undefined variable: velocity
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=runners-log-body-mass-index
    • > Notice in wp-content/plugins/runners-log/Includes/runnerslog_body_mass_index.php+44
    Undefined variable: bmi

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/runners-log/runnerslog.php
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/runners-log/Includes/runnerslog_weather_settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/runners-log/runnerslog_admin.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/runners-log/runnerslog_tag.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/runners-log/Includes/runnerslog_converter_toolbox.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/runners-log/runnerslog_gchart.php:498
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/runners-log/Includes/runnerslog_weight_change_effect.php:2
    • > PHP Notice
      Undefined index: runnerslog_op_hidden in wp-content/plugins/runners-log/runnerslog_admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/runners-log/runnerslog_metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/runners-log/Includes/runnerslog_training_zones.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/runners-log/Includes/runnerslog_v02max.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
Please take inspiration from this readme.txt

runners-log/runnerslog.php 85% from 13 tests

The entry point to "Runners Log" version 3.9.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 169 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("runners-log.php" instead of "runnerslog.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected4,719 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP184354164,718
JavaScript1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity11.25
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions49
▷ Named functions49100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Images/cross.png0.57KB0.49KB▼ 13.70%
Images/plus16.png0.26KB0.32KB0.00%
Images/tick.png0.36KB0.22KB▼ 38.04%
Images/ico16.png4.37KB0.89KB▼ 79.72%
Images/alert.png0.51KB0.67KB0.00%