wikimedia/wikimedia-fundraising-dash

View on GitHub
src/app/widgetBase.js

Summary

Maintainability
D
2 days
Test Coverage

Function WidgetBase has 305 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function WidgetBase( params ) {

        var self = this,
            MAX_RETRIES = 3;

Severity: Major
Found in src/app/widgetBase.js - About 1 day to fix

    Function processData has 117 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            self.processData = function ( rawdata, timescale, grouping, timestamp ) {
    
                var timeWord = ( timescale === 'Day' ? 'Dai' : timescale ) + 'ly',
                    totals,
                    counts,
    Severity: Major
    Found in src/app/widgetBase.js - About 4 hrs to fix

      File widgetBase.js has 320 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      define( [
          'jquery',
          'knockout',
          'operators'
      ], function ( $, ko, ops ) {
      Severity: Minor
      Found in src/app/widgetBase.js - About 3 hrs to fix

        Function filterText has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                self.filterText = ko.computed( function () {
                    var filterName,
                        text,
                        parts = [],
                        choices = self.userChoices(),
        Severity: Minor
        Found in src/app/widgetBase.js - About 1 hr to fix

          Function saveWidgetConfig has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  self.saveWidgetConfig = function () {
                      self.config.userChoices = self.userChoices();
                      self.config.filterQueryString = self.filterQueryString();
          
                      var data = JSON.stringify( {
          Severity: Minor
          Found in src/app/widgetBase.js - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status