Showing 5,566 of 7,504 total issues
Function wp_fix_server_vars
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function wp_fix_server_vars() {
global $PHP_SELF;
$default_server_values = array(
'SERVER_SOFTWARE' => '',
- 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 interleave_changed_lines
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function interleave_changed_lines( $orig, $final ) {
// Contains all pairwise string comparisons. Keys are such that this need only be a one dimensional array.
$matches = array();
foreach ( array_keys($orig) as $o ) {
- 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 wp-settings.php
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Used to setup and fix common variables and include
* the WordPress procedural and class library.
*
Function study
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.study = function (invocables) {
if (!isObject(invocables)) throw new Error("'invocables' must be an object");
var invocableKeys = objectKeys(invocables || {});
// Perform a topological sort of invocables to build an ordered plan
WP_List_Table
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class WP_List_Table {
/**
* The current list of items
*
SimplePie_Misc
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class SimplePie_Misc
{
function time_hms($seconds)
{
$time = '';
WP_Rewrite
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class WP_Rewrite {
/**
* Default permalink structure for WordPress.
*
* @since 1.5.0
Function Sender
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Sender = (function () {
function Sender(config) {
this._buffer = [];
this._lastSend = 0;
this._config = config;
Method import_blog
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
function import_blog($blogID) {
global $importing_blog;
$importing_blog = $blogID;
if ( isset($_GET['authors']) )
Method Analyze
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Analyze() {
$info = &$this->getid3->info;
$info['fileformat'] = 'quicktime';
$info['quicktime']['hinting'] = false;
Method parse
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parse()
{
if ($this->compressed_size >= $this->min_compressed_size)
{
// Check ID1, ID2, and CM
Method parse
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse()
{
if ($this->compressed_size >= $this->min_compressed_size)
{
// Check ID1, ID2, and CM
Function createToolbars
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createToolbars() {
var toolbars = [];
function addToolbar(items) {
var toolbarItems = [], buttonGroup;
Method wp_dashboard_right_now
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_dashboard_right_now() {
global $wp_registered_sidebars;
$num_posts = wp_count_posts( 'post' );
$num_pages = wp_count_posts( 'page' );
Method display_rows
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
function display_rows() {
global $mode;
$alt = '';
$super_admins = get_super_admins();
Method KnownGUIDs
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function KnownGUIDs() {
static $GUIDarray = array(
'GETID3_ASF_Extended_Stream_Properties_Object' => '14E6A5CB-C672-4332-8399-A96952065B5A',
'GETID3_ASF_Padding_Object' => '1806D474-CADF-4509-A4BA-9AABCB96AAE8',
'GETID3_ASF_Payload_Ext_Syst_Pixel_Aspect_Ratio' => '1B1EE554-F9EA-4BC8-821A-376B74E4C4B8',
Method get_bookmarks
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_bookmarks($args = '') {
global $wpdb;
$defaults = array(
'orderby' => 'name', 'order' => 'ASC',
File user.php
has 351 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress User API
*
* @package WordPress
Function updateStyle
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
updateStyle : function(ty) {
var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : f.img_style.value});
if (tinyMCEPopup.editor.settings.inline_styles) {
// Handle align
- 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 render_screen_options
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function render_screen_options() {
global $wp_meta_boxes, $wp_list_table;
$columns = get_column_headers( $this );
$hidden = get_hidden_columns( $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"