Showing 10,370 of 14,330 total issues
Function editor_settings
has a Cognitive Complexity of 184 (exceeds 5 allowed). Consider refactoring. Open
public static function editor_settings( $editor_id, $set ) {
if ( empty( self::$first_init ) ) {
if ( is_admin() ) {
add_action( 'admin_print_footer_scripts', array( __CLASS__, 'editor_js' ), 50 );
add_action( 'admin_print_footer_scripts', array( __CLASS__, 'force_uncompressed_tinymce' ), 1 );
- Read upRead up
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 block-directory.js
has 1417 lines of code (exceeds 250 allowed). Consider refactoring. Open
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
File format-library.js
has 1415 lines of code (exceeds 250 allowed). Consider refactoring. Open
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
File option.php
has 1412 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Option API
*
* @package WordPress
Function single_row
has a Cognitive Complexity of 182 (exceeds 5 allowed). Consider refactoring. Open
public function single_row( $item ) {
global $status, $page, $s, $totals;
static $plugin_id_attrs = array();
list( $plugin_file, $plugin_data ) = $item;
- Read upRead up
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 media-template.php
has 1400 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress media templates.
*
* @package WordPress
Function mediaWidgets
has 711 lines of code (exceeds 25 allowed). Consider refactoring. Open
wp.mediaWidgets = ( function( $ ) {
'use strict';
var component = {};
Function jsonlint
has a Cognitive Complexity of 174 (exceeds 5 allowed). Consider refactoring. Open
var jsonlint = (function(){
var parser = {trace: function trace() { },
yy: {},
symbols_: {"error":2,"JSONString":3,"STRING":4,"JSONNumber":5,"NUMBER":6,"JSONNullLiteral":7,"NULL":8,"JSONBooleanLiteral":9,"TRUE":10,"FALSE":11,"JSONText":12,"JSONValue":13,"EOF":14,"JSONObject":15,"JSONArray":16,"{":17,"}":18,"JSONMemberList":19,"JSONMember":20,":":21,",":22,"[":23,"]":24,"JSONElementList":25,"$accept":0,"$end":1},
terminals_: {2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},
- Read upRead up
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
Method create_initial_post_types
has 703 lines of code (exceeds 25 allowed). Consider refactoring. Open
function create_initial_post_types() {
WP_Post_Type::reset_default_labels();
register_post_type(
'post',
Function debug_data
has a Cognitive Complexity of 171 (exceeds 5 allowed). Consider refactoring. Open
public static function debug_data() {
global $wpdb, $_wp_theme_features;
// Save few function calls.
$upload_dir = wp_upload_dir();
- Read upRead up
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 link
has 690 lines of code (exceeds 25 allowed). Consider refactoring. Open
var link = (function (domGlobals) {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
File dashboard.php
has 1311 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress Dashboard Widget Administration Screen API
*
* @package WordPress
Function ParseRIFF
has a Cognitive Complexity of 168 (exceeds 5 allowed). Consider refactoring. Open
public function ParseRIFF($startoffset, $maxoffset) {
$info = &$this->getid3->info;
$RIFFchunk = array();
$FoundAllChunksWeNeed = false;
- Read upRead up
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 1299 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @output wp-admin/js/theme.js
*/
/* global _wpThemeSettings, confirm, tb_position */
File pluggable.php
has 1291 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* These functions can be replaced via plugins. If plugins do not redefine these
* functions, then these will be used instead.
*
File class-wp-debug-data.php
has 1283 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Class for providing debug data based on a users WordPress environment.
*
* @package WordPress
File backbone.js
has 1278 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Backbone.js 1.5.0
// (c) 2010-2022 Jeremy Ashkenas and DocumentCloud
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
File plugin.js
has 1271 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function () {
var media = (function () {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
File plugin.js
has 1261 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function () {
var charmap = (function () {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
Function parse_query
has a Cognitive Complexity of 161 (exceeds 5 allowed). Consider refactoring. Open
public function parse_query( $query = '' ) {
if ( ! empty( $query ) ) {
$this->init();
$this->query = wp_parse_args( $query );
$this->query_vars = $this->query;
- Read upRead up
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"