WordPress/WordPress

View on GitHub

Showing 10,391 of 14,520 total issues

Function CSSLint has a Cognitive Complexity of 2488 (exceeds 5 allowed). Consider refactoring.
Open

var CSSLint = (function(){
  var module = module || {},
      exports = exports || {};

/*!
Severity: Minor
Found in wp-includes/js/codemirror/csslint.js - About 1 mo 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 inlite has 9618 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var inlite = (function (domGlobals) {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.ThemeManager');

Severity: Major
Found in wp-includes/js/tinymce/themes/inlite/theme.js - About 1 mo to fix

    Function modern has 9449 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var modern = (function (domGlobals) {
        'use strict';
    
        var global = tinymce.util.Tools.resolve('tinymce.ThemeManager');
    
    
    Severity: Major
    Found in wp-includes/js/tinymce/themes/modern/theme.js - About 1 mo to fix

      Function CSSLint has 6552 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var CSSLint = (function(){
        var module = module || {},
            exports = exports || {};
      
      /*!
      Severity: Major
      Found in wp-includes/js/codemirror/csslint.js - About 1 mo to fix

        Function get_enclosures has a Cognitive Complexity of 1571 (exceeds 5 allowed). Consider refactoring.
        Open

            public function get_enclosures()
            {
                if (!isset($this->data['enclosures']))
                {
                    $this->data['enclosures'] = array();
        Severity: Minor
        Found in wp-includes/SimplePie/Item.php - About 1 mo 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

        File theme.js has 9623 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        (function () {
        var inlite = (function (domGlobals) {
            'use strict';
        
            var global = tinymce.util.Tools.resolve('tinymce.ThemeManager');
        Severity: Major
        Found in wp-includes/js/tinymce/themes/inlite/theme.js - About 1 mo to fix

          File theme.js has 9454 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          (function () {
          var modern = (function (domGlobals) {
              'use strict';
          
              var global = tinymce.util.Tools.resolve('tinymce.ThemeManager');
          Severity: Major
          Found in wp-includes/js/tinymce/themes/modern/theme.js - About 3 wks to fix

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

            },{}],5:[function(_dereq_,module,exports){
            'use strict';
            
            Object.defineProperty(exports, "__esModule", {
                value: true
            Severity: Minor
            Found in wp-includes/js/mediaelement/mediaelement.js - About 3 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

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

            },{}],5:[function(_dereq_,module,exports){
            'use strict';
            
            Object.defineProperty(exports, "__esModule", {
                value: true
            Severity: Minor
            Found in wp-includes/js/mediaelement/mediaelement-and-player.js - About 3 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

            Function parserlib has 4285 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var parserlib = (function () {
            var require;
            require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
            "use strict";
            
            
            Severity: Major
            Found in wp-includes/js/codemirror/csslint.js - About 3 wks to fix

              File mediaelement-and-player.js has 7013 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*!
               * MediaElement.js
               * http://www.mediaelementjs.com/
               *
               * Wrapper that mimics native HTML5 MediaElement (audio and video)
              Severity: Major
              Found in wp-includes/js/mediaelement/mediaelement-and-player.js - About 2 wks to fix

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

                /*!
                 * jQuery JavaScript Library v3.7.1
                 * https://jquery.com/
                 *
                 * Copyright OpenJS Foundation and other contributors
                Severity: Major
                Found in wp-includes/js/jquery/jquery.js - About 2 wks to fix

                  File csslint.js has 6554 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*!
                  CSSLint v1.0.4
                  Copyright (c) 2016 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
                  
                  Permission is hereby granted, free of charge, to any person obtaining a copy
                  Severity: Major
                  Found in wp-includes/js/codemirror/csslint.js - About 2 wks to fix

                    File blocks-json.php has 6386 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php return array(
                      'archives' => array(
                        '$schema' => 'https://schemas.wp.org/trunk/block.json',
                        'apiVersion' => 3,
                        'name' => 'core/archives',
                    Severity: Major
                    Found in wp-includes/blocks/blocks-json.php - About 2 wks to fix

                      File esprima.js has 6151 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      (function webpackUniversalModuleDefinition(root, factory) {
                      /* istanbul ignore next */
                          if(typeof exports === 'object' && typeof module === 'object')
                              module.exports = factory();
                          else if(typeof define === 'function' && define.amd)
                      Severity: Major
                      Found in wp-includes/js/codemirror/esprima.js - About 2 wks to fix

                        File customize-controls.js has 5805 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /**
                         * @output wp-admin/js/customize-controls.js
                         */
                        
                        /* global _wpCustomizeHeader, _wpCustomizeBackground, _wpMediaViewsL10n, MediaElementPlayer, console, confirm */
                        Severity: Major
                        Found in wp-admin/js/customize-controls.js - About 2 wks to fix

                          File moxie.js has 5525 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          ;var MXI_DEBUG = false;
                          /**
                           * mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill
                           * v1.3.5
                           *
                          Severity: Major
                          Found in wp-includes/js/plupload/moxie.js - About 2 wks to fix

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

                            /******/ (() => { // webpackBootstrap
                            /******/     var __webpack_modules__ = ({
                            
                            /***/ 7145:
                            /***/ ((module) => {
                            Severity: Major
                            Found in wp-includes/js/media-views.js - About 2 wks to fix

                              Function 16 has a Cognitive Complexity of 749 (exceeds 5 allowed). Consider refactoring.
                              Open

                              },{}],16:[function(_dereq_,module,exports){
                              'use strict';
                              
                              Object.defineProperty(exports, "__esModule", {
                                  value: true
                              Severity: Minor
                              Found in wp-includes/js/mediaelement/mediaelement-and-player.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

                              Function Parser has 2892 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  var Parser = (function () {
                                      function Parser(code, options, delegate) {
                                          if (options === void 0) { options = {}; }
                                          this.config = {
                                              range: (typeof options.range === 'boolean') && options.range,
                              Severity: Major
                              Found in wp-includes/js/codemirror/esprima.js - About 2 wks to fix
                                Severity
                                Category
                                Status
                                Source
                                Language