insideout10/wordlift-plugin-js

View on GitHub

Showing 3,223 of 3,223 total issues

File jquery-1.9.1.js has 6570 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v1.9.1
 * http://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in app/lib/jquery-ui-1.10.3/jquery-1.9.1.js - About 2 wks to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    (function( $ ) {
    
    var increments = 0;
    
    function addDescribedBy( elem, id ) {
    Severity: Major
    Found in app/lib/jquery-ui-1.10.3/ui/jquery-ui.js and 1 other location - About 2 wks to fix
    app/lib/jquery-ui-1.10.3/ui/jquery.ui.tooltip.js on lines 16..402

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2974.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    (function( $ ) {
    
    var increments = 0;
    
    function addDescribedBy( elem, id ) {
    Severity: Major
    Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.tooltip.js and 1 other location - About 2 wks to fix
    app/lib/jquery-ui-1.10.3/ui/jquery-ui.js on lines 14617..15003

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2974.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    (function( $, undefined ) {
    
    var uuid = 0,
        runiqueId = /^ui-id-\d+$/;
    
    
    Severity: Major
    Found in app/lib/jquery-ui-1.10.3/ui/jquery-ui.js and 1 other location - About 2 wks to fix
    app/lib/jquery-ui-1.10.3/ui/jquery.ui.core.js on lines 11..320

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2696.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    (function( $, undefined ) {
    
    var uuid = 0,
        runiqueId = /^ui-id-\d+$/;
    
    
    Severity: Major
    Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.core.js and 1 other location - About 2 wks to fix
    app/lib/jquery-ui-1.10.3/ui/jquery-ui.js on lines 5..314

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2696.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function TimeNav has a Cognitive Complexity of 705 (exceeds 5 allowed). Consider refactoring.
    Open

        VMM.Timeline.TimeNav = function(parent, content_width, content_height) {
            trace("VMM.Timeline.TimeNav");
            
            var $timenav, $content, $time, $timeintervalminor, $timeinterval, $timeintervalmajor, $timebackground, 
                $timeintervalbackground, $timenavline, $timenavindicator, $timeintervalminor_minor, $toolbar, $zoomin, $zoomout, $dragslide,
    Severity: Minor
    Found in app/lib/TimelineJS.build/build/js/timeline.js - About 2 wks to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    (function( $, undefined ) {
    
    $.widget("ui.selectable", $.ui.mouse, {
        version: "1.10.3",
        options: {
    Severity: Major
    Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.selectable.js and 1 other location - About 1 wk to fix
    app/lib/jquery-ui-1.10.3/ui/jquery-ui.js on lines 3240..3501

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2249.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    (function( $, undefined ) {
    
    $.widget("ui.selectable", $.ui.mouse, {
        version: "1.10.3",
        options: {
    Severity: Major
    Found in app/lib/jquery-ui-1.10.3/ui/jquery-ui.js and 1 other location - About 1 wk to fix
    app/lib/jquery-ui-1.10.3/ui/jquery.ui.selectable.js on lines 16..277

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2249.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File jshint.js has 3890 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * JSHint, by JSHint Community.
     *
     * This file (and this file only) is licensed under the same slightly modified
     * MIT license that JSLint is. It stops evil-doers everywhere.
    Severity: Major
    Found in app/lib/jquery-ui-1.10.3/external/jshint.js - About 1 wk to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      (function( $, undefined ) {
      
      var mouseHandled = false;
      $( document ).mouseup( function() {
          mouseHandled = false;
      Severity: Major
      Found in app/lib/jquery-ui-1.10.3/ui/jquery-ui.js and 1 other location - About 1 wk to fix
      app/lib/jquery-ui-1.10.3/ui/jquery.ui.mouse.js on lines 14..169

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 1350.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      (function( $, undefined ) {
      
      var mouseHandled = false;
      $( document ).mouseup( function() {
          mouseHandled = false;
      Severity: Major
      Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.mouse.js and 1 other location - About 1 wk to fix
      app/lib/jquery-ui-1.10.3/ui/jquery-ui.js on lines 828..983

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 1350.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      File media-views.js has 2768 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* global _wpMediaViewsL10n, confirm, getUserSetting, setUserSetting */
      (function($){
          var media       = wp.media,
              Attachment  = media.model.Attachment,
              Attachments = media.model.Attachments,
      Severity: Major
      Found in app/admin_files/media-views.js - About 1 wk to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

          Traslator = (function() {
            var decodeHtml;
        
            Traslator.prototype._htmlPositions = [];
        
        
        Severity: Major
        Found in app/js/wordlift-reloaded.js and 1 other location - About 1 wk to fix
        app/js/wordlift.js on lines 5..120

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 1210.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

          Traslator = (function() {
            var decodeHtml;
        
            Traslator.prototype._htmlPositions = [];
        
        
        Severity: Major
        Found in app/js/wordlift.js and 1 other location - About 1 wk to fix
        app/js/wordlift-reloaded.js on lines 5..120

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 1210.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function Formatter has 1397 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            tinymce.Formatter = function(ed) {
                var formats = {},
                    each = tinymce.each,
                    dom = ed.dom,
                    selection = ed.selection,
        Severity: Major
        Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 6 days to fix

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                  function addValidElements(valid_elements) {
                      var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
                          prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value,
                          elementRuleRegExp = /^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,
                          attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
          Severity: Major
          Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js and 1 other location - About 6 days to fix
          app/admin_files/wp-tinymce-schema.js on lines 453..590

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 1064.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                  function addValidElements(valid_elements) {
                      var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
                          prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value,
                          elementRuleRegExp = /^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,
                          attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
          Severity: Major
          Found in app/admin_files/wp-tinymce-schema.js and 1 other location - About 6 days to fix
          app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js on lines 2774..2911

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 1064.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            angular.module('wordlift.ui.carousel', []).directive('wlCarousel', [
              '$window', '$log', function($window, $log) {
                return {
                  restrict: 'A',
                  scope: true,
          Severity: Major
          Found in app/js/wordlift-faceted-entity-search-widget.js and 1 other location - About 6 days to fix
          app/js/wordlift-reloaded.js on lines 141..243

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 1063.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            angular.module('wordlift.ui.carousel', []).directive('wlCarousel', [
              '$window', '$log', function($window, $log) {
                return {
                  restrict: 'A',
                  scope: true,
          Severity: Major
          Found in app/js/wordlift-reloaded.js and 1 other location - About 6 days to fix
          app/js/wordlift-faceted-entity-search-widget.js on lines 4..106

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 1063.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Function TimeNav has 1252 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              VMM.Timeline.TimeNav = function(parent, content_width, content_height) {
                  trace("VMM.Timeline.TimeNav");
                  
                  var $timenav, $content, $time, $timeintervalminor, $timeinterval, $timeintervalmajor, $timebackground, 
                      $timeintervalbackground, $timenavline, $timenavindicator, $timeintervalminor_minor, $toolbar, $zoomin, $zoomout, $dragslide,
          Severity: Major
          Found in app/lib/TimelineJS.build/build/js/timeline.js - About 6 days to fix
            Severity
            Category
            Status
            Source
            Language