62% sprint

Code Review | Sprint

WordPress plugin Sprint scored62%from 54 tests.

About plugin

  • Plugin page: sprint
  • Plugin version: 3.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2021
  • Latest release: Apr 27, 2023
  • Number of updates: 24
  • Update frequency: every 29.1 days
  • Top authors: sprintlogistics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /733 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.45MB] [CPU: ▼24.08ms] Passed 4 tests

Analyzing server-side resources used by Sprint
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2943.45 ▲4.71
Dashboard /wp-admin3.50 ▲0.1534.03 ▼24.30
Posts /wp-admin/edit.php3.57 ▲0.2036.64 ▼9.18
Add New Post /wp-admin/post-new.php3.48 ▼2.4138.15 ▼63.06
Media Library /wp-admin/upload.php3.50 ▲0.2734.51 ▲0.21
Orders /wp-admin/admin.php?page=erp-sprint3.4734.96
Setting /wp-admin/admin.php?page=erp-sprint-setting3.4730.32
Calculate Tariff /wp-admin/admin.php?page=erp-sprint-calculate-tariff3.4732.13
Vendor /wp-admin/admin.php?page=erp-sprint-vendor3.4729.43
Pickup Request /wp-admin/admin.php?page=erp-sprint-pickup-request3.4729.92
Create Waybill /wp-admin/admin.php?page=erp-sprint-create-waybill3.4731.09

Server storage [IO: ▲0.64MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 52 new files
Database: 4 new tables, 7 new options
New tables
wp_logixgridwaybillSecureKey
hello
wp_logixgridsetting
wp_logixgridvendor
New WordPress options
widget_recent-posts
recovery_mode_email_last_sent
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Sprint
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,507 ▼1,26412.75 ▼1.601.81 ▲0.2142.55 ▲2.01
Dashboard /wp-admin900 ▼1,2811.72 ▼3.9820.70 ▼81.9522.28 ▼17.70
Posts /wp-admin/edit.php911 ▼1,1891.52 ▼0.439.83 ▼28.4820.51 ▼14.45
Add New Post /wp-admin/post-new.php628 ▼9071.98 ▼16.2223.09 ▼631.057.96 ▼49.60
Media Library /wp-admin/upload.php796 ▼6012.10 ▼2.2928.28 ▼67.7424.21 ▼15.38
Orders /wp-admin/admin.php?page=erp-sprint7311.5210.6921.40
Setting /wp-admin/admin.php?page=erp-sprint-setting7311.529.6516.38
Calculate Tariff /wp-admin/admin.php?page=erp-sprint-calculate-tariff7311.529.7719.90
Vendor /wp-admin/admin.php?page=erp-sprint-vendor7311.529.8118.92
Pickup Request /wp-admin/admin.php?page=erp-sprint-pickup-request7311.5210.0817.03
Create Waybill /wp-admin/admin.php?page=erp-sprint-create-waybill7311.699.3721.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • hello
    • wp_logixgridwaybillSecureKey
    • wp_logixgridsetting
    • wp_logixgridvendor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=erp-sprint-create-waybill
    • > Error in wp-content/plugins/sprint/sprint.php+247
    Uncaught Error: Call to undefined function wc_clean() in wp-content/plugins/sprint/sprint.php:247
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): waybill_admin_notices()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin-header.php(303): do_action()
    #4 wp-admin/admin.php(239): require_once('/var/www/wordpr...')
    #5 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sprint/templates/erp_sprint_pickup_request.php
    • > /wp-content/plugins/sprint/sprint.php
    • > /wp-content/plugins/sprint/templates/erp_sprint_calculate_tariff.php
    • > /wp-content/plugins/sprint/templates/erp_sprint_vendor.php
    • > /wp-content/plugins/sprint/templates/erp_sprint_create_waybill.php
    • > /wp-content/plugins/sprint/templates/erp_sprint_orders.php
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: RespStates in wp-content/plugins/sprint/templates/erp_sprint_calculate_tariff.php on line 145
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sprint/templates/erp_sprint_calculate_tariff.php on line 129
    • > PHP Notice
      Undefined variable: services in wp-content/plugins/sprint/templates/erp_sprint_calculate_tariff.php on line 219
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sprint/templates/erp_sprint_create_waybill.php on line 188
    • > PHP Notice
      Undefined variable: services in wp-content/plugins/sprint/templates/erp_sprint_create_waybill.php on line 188
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sprint/templates/erp_sprint_calculate_tariff.php on line 178
    • > PHP Notice
      Undefined variable: RespStates in wp-content/plugins/sprint/templates/erp_sprint_calculate_tariff.php on line 190
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sprint/templates/erp_sprint_calculate_tariff.php on line 219
    • > PHP Notice
      Undefined variable: country in wp-content/plugins/sprint/templates/erp_sprint_calculate_tariff.php on line 178
    • > PHP Notice
      Undefined variable: vendor_list in wp-content/plugins/sprint/templates/erp_sprint_vendor.php on line 321

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2 in sprint/assets to your readme.txt
You can take inspiration from this readme.txt

sprint/sprint.php 85% from 13 tests

The primary PHP file in "Sprint" version 3.6 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("5.1" instead of "1.0")
  • Text Domain: Please use dashes and lowercase characters for text domains

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
Good job! No executable or dangerous file extensions detected11,734 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22,0167,0006,920
PHP313443084,383
CSS1330415
JSON10016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.06
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes15.56%
Methods80
▷ Static methods1620.00%
▷ Public methods7593.75%
▷ Protected methods00.00%
▷ Private methods56.25%
Functions14
▷ Named functions1178.57%
▷ Anonymous functions321.43%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin