suitmedia/suitcoda

View on GitHub

Showing 552 of 784 total issues

CrawlerUrlTest has 22 functions (exceeds 20 allowed). Consider refactoring.
Open

class CrawlerUrlTest extends TestCase
{
    /**
     * Setup the test environment.
     *
Severity: Minor
Found in tests/Supports/CrawlerUrlTest.php - About 2 hrs to fix

    CrawlerUrl has 22 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class CrawlerUrl
    {
        /**
         * Stores the base url of current crawling session
         *
    Severity: Minor
    Found in app/Supports/CrawlerUrl.php - About 2 hrs to fix

      Function runTool has 57 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                          runTool: function(D, A, r) {
                              var G, w, C, v, y, q, B, t, F, E, x, z = YSLOW.Tools.getTool(D);
                              try {
                                  if (typeof z === "object") {
                                      G = z.run(A.document, A.component_set, r);
      Severity: Major
      Found in performance/yslow.js - About 2 hrs to fix

        Function handle has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
        Open

            public function handle(ProjectWatcher $event)
            {
                $urlsFromDatabase = $event->project->urls->pluck('url');
                if (is_string($urlsFromDatabase)) {
                    $urlsFromDatabase = (array)$urlsFromDatabase;
        Severity: Minor
        Found in app/Listeners/CrawlerTheWebsite.php - About 2 hrs 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

        Function ajaxConvert has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function ajaxConvert( s, response, jqXHR, isSuccess ) {
            var conv2, current, conv, tmp, prev,
                converters = {},
                // Work with a copy of dataTypes in case we need to modify it for conversion
                dataTypes = s.dataTypes.slice();
        Severity: Major
        Found in _frontend/assets/js/vendor/jquery.min.js - About 2 hrs to fix

          Function ajaxConvert has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function ajaxConvert( s, response, jqXHR, isSuccess ) {
              var conv2, current, conv, tmp, prev,
                  converters = {},
                  // Work with a copy of dataTypes in case we need to modify it for conversion
                  dataTypes = s.dataTypes.slice();
          Severity: Major
          Found in _frontend/dev/js/vendor/jquery.js - About 2 hrs to fix

            Function getDict has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                getDict: function(t, B) {
                                    var x, z, s, w, q, A, v, r = YSLOW,
                                        y = r.controller,
                                        C = r.doc.rules,
                                        u = {
            Severity: Major
            Found in performance/yslow.js - About 2 hrs to fix

              File ResultReader.php has 257 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              namespace Suitcoda\Supports;
              
              use Suitcoda\Model\Issue;
              Severity: Minor
              Found in app/Supports/ResultReader.php - About 2 hrs to fix

                Function lint has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                    lint: function(B, E, s) {
                                        var u, y, t, v, A, x, D, C = (E.inline && E.inline.styles) || [],
                                            r = E.getComponentsByType("css"),
                                            w = [],
                                            q = 0,
                Severity: Major
                Found in performance/yslow.js - About 2 hrs to fix

                  Function init has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              var init = function () {
                  
                                  function drawGraph ( graph, dataTitle, dataSeries, dataXAxis) {
                                      var option = {
                                          title: {
                  Severity: Major
                  Found in _frontend/assets/js/main.min.js - About 2 hrs to fix

                    Function init has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                var init = function () {
                    
                                    function drawGraph ( graph, dataTitle, dataSeries, dataXAxis) {
                                        var option = {
                                            title: {
                    Severity: Major
                    Found in _frontend/dev/js/main.js - About 2 hrs to fix

                      Function _setAvgMilestone has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              _setAvgMilestone: function(par) {
                                  if (par) {
                                      var that = par.that;
                                      var $el = par.$el;
                                      var opt = that.opt;
                      Severity: Major
                      Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 2 hrs to fix

                        Function saveRuleset has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                            saveRuleset: function(y, r) {
                                                var t, s, v, q, u, z, B, A, x = {},
                                                    w = {};
                                                if (r) {
                                                    x.custom = true;
                        Severity: Major
                        Found in performance/yslow.js - About 2 hrs to fix

                          Function setSplashView has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                              setSplashView: function(r, s, t) {
                                                  var w, v = "Grade your web pages with YSlow",
                                                      x = "YSlow gives you:",
                                                      u = "<li>Grade based on the performance (you can define your own rules)</li><li>Summary of the Components in the page</li><li>Chart with statistics</li><li>Tools including Smush.It and JSLint</li>",
                                                      q = "Learn more about YSlow and YDN";
                          Severity: Major
                          Found in performance/yslow.js - About 2 hrs to fix

                            Function remove has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                remove: function( elem, types, handler, selector, mappedTypes ) {
                                    var j, handleObj, tmp,
                                        origCount, t, events,
                                        special, handlers, type,
                                        namespaces, origType,
                            Severity: Major
                            Found in _frontend/assets/js/vendor/jquery.min.js - About 2 hrs to fix

                              Function remove has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  remove: function( elem, types, handler, selector, mappedTypes ) {
                                      var j, handleObj, tmp,
                                          origCount, t, events,
                                          special, handlers, type,
                                          namespaces, origType,
                              Severity: Major
                              Found in _frontend/dev/js/vendor/jquery.js - About 2 hrs to fix

                                Method doRequest has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function doRequest($url, $try = null)
                                    {
                                        if (is_null($try)) {
                                            $try = $this->retry;
                                        }
                                Severity: Major
                                Found in app/Supports/CrawlerUrl.php - About 2 hrs to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                  if ( ( mappedTypes || origType === handleObj.origType ) &&
                                                      ( !handler || handler.guid === handleObj.guid ) &&
                                                      ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                                      ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                                                      handlers.splice( j, 1 );
                                  Severity: Critical
                                  Found in _frontend/assets/js/vendor/jquery.min.js - About 2 hrs to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                    if ( ( mappedTypes || origType === handleObj.origType ) &&
                                                        ( !handler || handler.guid === handleObj.guid ) &&
                                                        ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                                        ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                                                        handlers.splice( j, 1 );
                                    Severity: Critical
                                    Found in _frontend/dev/js/vendor/jquery.js - About 2 hrs to fix

                                      Function onTouchEnd has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      FastClick.prototype.onTouchEnd = function(event) {
                                          'use strict';
                                          var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
                                      
                                          if (!this.trackingClick) {
                                      Severity: Minor
                                      Found in _frontend/assets/js/vendor/fastclick.min.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language