10% simply-strava

Code Review | Simply Strava

WordPress plugin Simply Strava scored10%from 54 tests.

About plugin

  • Plugin page: simply-strava
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-3.5
  • WordPress version: 6.3.1
  • First release: Jan 15, 2013
  • Latest release: Apr 20, 2013
  • Number of updates: 5
  • Update frequency: every 19.0 days
  • Top authors: junkins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,265 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/simply-strava/simplystrava.php+234
    Methods with the same name as their class will not be constructors in a future version of PHP; Simply_Strava_Widget has a deprecated constructor

Server metrics [RAM: ▼1.81MB] [CPU: ▼61.83ms] Passed 4 tests

Server-side resources used by Simply Strava
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.294.95 ▼49.48
Dashboard /wp-admin2.20 ▼1.116.97 ▼53.65
Posts /wp-admin/edit.php2.20 ▼1.166.26 ▼53.96
Add New Post /wp-admin/post-new.php2.20 ▼3.695.33 ▼90.21
Media Library /wp-admin/upload.php2.20 ▼1.037.11 ▼29.93
Simply Strava /wp-admin/options-general.php?page=simply-strava/simplystrava.php2.206.14

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_simply_strava_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Simply Strava
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7513.33 ▼0.821.87 ▼0.2142.03 ▼7.56
Dashboard /wp-admin2,210 ▲255.86 ▲0.01138.13 ▲13.9849.70 ▲2.37
Posts /wp-admin/edit.php2,099 ▲72.01 ▲0.0037.13 ▼3.2437.85 ▲4.07
Add New Post /wp-admin/post-new.php1,529 ▼422.96 ▼0.26690.70 ▲40.7852.45 ▼17.70
Media Library /wp-admin/upload.php1,392 ▲44.22 ▲0.01105.83 ▼0.8143.73 ▲0.37
Simply Strava /wp-admin/options-general.php?page=simply-strava/simplystrava.php2,4222.0226.2039.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/simply-strava/simplystrava.php+234
    Methods with the same name as their class will not be constructors in a future version of PHP; Simply_Strava_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_simply_strava_widget
    • theysaidso_admin_options

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)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=simply-strava/simplystrava.php
    • > Deprecated in wp-content/plugins/simply-strava/simplystrava.php+234
    Methods with the same name as their class will not be constructors in a future version of PHP; Simply_Strava_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=simply-strava/simplystrava.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Simply_Strava_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simply-strava/simplystrava.php
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simply-strava/simplystrava.php
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simply-strava/simplystrava.php
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simply-strava/simplystrava.php
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simply-strava/simplystrava_auth.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/simply-strava/simplystrava.php:14
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/simply-strava/simplystrava.php on line 14
    • > PHP Notice
      Undefined index: auth in wp-content/plugins/simply-strava/simplystrava_auth.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
5 plugin tags: running, cycling, widget, strava, gps

simply-strava/simplystrava.php 92% from 13 tests

The main file in "Simply Strava" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simply-strava.php" instead of "simplystrava.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
No dangerous file extensions were detected455 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP314754451
CSS1014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity24.00
▷ Minimum class complexity14.00
▷ Maximum class complexity34.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods964.29%
▷ Protected methods00.00%
▷ Private methods535.71%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
strava_200.png10.16KB3.75KB▼ 63.13%