Showing 5,566 of 7,504 total issues
File class-wp-ms-sites-list-table.php
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Sites List Table class.
*
* @package WordPress
Function PageViewPerformance
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
var PageViewPerformance = (function (_super) {
__extends(PageViewPerformance, _super);
function PageViewPerformance(name, url, durationMs, properties, measurements) {
_super.call(this);
this.aiDataContract = {
Function preview
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
preview: function( event ) {
var self = this,
current, preview;
// Bail if the user scrolled on a touch device
Function setup
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup : function() {
var t = this, h, c, el, id, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, d = t.I('img_demo'), dom = tinyMCEPopup.dom, DL, caption = '';
document.dir = tinyMCEPopup.editor.getParam('directionality','');
if ( tinyMCEPopup.editor.getParam('wpeditimage_disable_captions', false) )
Method prepare_items
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prepare_items() {
include( ABSPATH . 'wp-admin/includes/theme-install.php' );
global $tabs, $tab, $paged, $type, $theme_field_defaults;
wp_reset_vars( array( 'tab' ) );
Method posts2wp
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function posts2wp($posts='')
{
// General Housekeeping
global $wpdb;
$count = 0;
Method prepare_simplepie_object_for_cache
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function prepare_simplepie_object_for_cache($data)
{
$items = $data->get_items();
$items_by_id = array();
Method diff
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function diff($from_lines, $to_lines)
{
array_walk($from_lines, array('Text_Diff', 'trimNewlines'));
array_walk($to_lines, array('Text_Diff', 'trimNewlines'));
Method send_headers
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function send_headers() {
$headers = array('X-Pingback' => get_bloginfo('pingback_url'));
$status = null;
$exit_required = false;
Method prepare_simplepie_object_for_cache
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prepare_simplepie_object_for_cache($data)
{
$items = $data->get_items();
$items_by_id = array();
Method wp_die
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_die( $message, $title = '', $args = array() ) {
global $wp_locale;
$defaults = array( 'response' => 500 );
$r = wp_parse_args($args, $defaults);
Method get_permalink
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_permalink($id = 0, $leavename = false) {
$rewritecode = array(
'%year%',
'%monthnum%',
'%day%',
Method wp_list_authors
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_list_authors($args = '') {
global $wpdb;
$defaults = array(
'optioncount' => false, 'exclude_admin' => true,
Function getAttrib
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
getAttrib : function(e, at) {
var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
if (ed.settings.inline_styles) {
switch (at) {
- 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 InlineWindowManager
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
tinymce.WPWindowManager = tinymce.InlineWindowManager = function( editor ) {
if ( this.wp ) {
return this;
}
- 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 startDrag
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
startDrag: function(event) {
if (Event.isLeftClick(event)) {
if (!this.disabled){
this.active = true;
- 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 meta_box_prefs
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function meta_box_prefs( $screen ) {
global $wp_meta_boxes;
if ( is_string( $screen ) )
$screen = convert_to_screen( $screen );
- 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 wp_get_nav_menu_to_edit
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function wp_get_nav_menu_to_edit( $menu_id = 0 ) {
$menu = wp_get_nav_menu_object( $menu_id );
// If the menu exists, get its items.
if ( is_nav_menu( $menu ) ) {
- 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 wp_handle_sideload
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function wp_handle_sideload( &$file, $overrides = false ) {
// The default error handler.
if (! function_exists( 'wp_handle_upload_error' ) ) {
function wp_handle_upload_error( &$file, $message ) {
return array( 'error'=>$message );
- 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_cat_row
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function link_cat_row( $category, $name_override = false ) {
static $row_class = '';
if ( !$category = get_term( $category, 'link_category', OBJECT, 'display' ) )
return 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"