emotionLoop/visualCaptcha-frontend-jquery

View on GitHub

Showing 5 of 5 total issues

File visualcaptcha.jquery.src.js has 820 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! visualCaptcha - v0.0.8 - 2016-01-23
* http://visualcaptcha.net
* Copyright (c) 2016 emotionLoop; Licensed MIT */

(function( root, factory ) {
Severity: Major
Found in visualcaptcha.jquery.src.js - About 1 day to fix

    Function normalize has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function normalize(name, baseName) {
            var nameParts, nameSegment, mapValue, foundMap, lastIndex,
                foundI, foundStarMap, starI, i, j, part,
                baseParts = baseName && baseName.split("/"),
                map = config.map,
    Severity: Major
    Found in visualcaptcha.jquery.src.js - About 2 hrs to fix

      Function visualCaptcha has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $.fn.visualCaptcha = function( options ) {
              var config;
      
              config = $.extend( {
                  imgPath: '/',
      Severity: Minor
      Found in visualcaptcha.jquery.src.js - About 1 hr to fix

        Avoid deeply nested control flow statements.
        Open

                                if (i === 1 && (name[2] === '..' || name[0] === '..')) {
                                    //End of the line. Keep at least one non-dot
                                    //path segment at the front so it can be mapped
                                    //correctly to disk. Otherwise, there is likely
                                    //no path mapping for a path starting with '..'.
        Severity: Major
        Found in visualcaptcha.jquery.src.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if (mapValue) {
                                      mapValue = mapValue[nameSegment];
                                      if (mapValue) {
                                          //Match, update name to the new value.
                                          foundMap = mapValue;
          Severity: Major
          Found in visualcaptcha.jquery.src.js - About 45 mins to fix
            Severity
            Category
            Status
            Source
            Language