Showing 5,566 of 7,504 total issues
Function unzip_file
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
function unzip_file($file, $to) {
global $wp_filesystem;
if ( ! $wp_filesystem || !is_object($wp_filesystem) )
return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
- 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 get_plugin_files
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
function get_plugin_files($plugin) {
$plugin_file = WP_PLUGIN_DIR . '/' . $plugin;
$dir = dirname($plugin_file);
$plugin_files = array($plugin);
if ( is_dir($dir) && $dir != WP_PLUGIN_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 ASF_HeaderExtensionObjectDataParse
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function ASF_HeaderExtensionObjectDataParse(&$asf_header_extension_object_data, &$unhandled_sections) {
// http://msdn.microsoft.com/en-us/library/bb643323.aspx
$offset = 0;
$objectOffset = 0;
- 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-langs-en.js
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
tinyMCE.addI18n({en:{
common:{
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
apply:"Apply",
insert:"Insert",
File class-wp-comments-list-table.php
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Comments and Post Comments List Table classes.
*
* @package WordPress
File ms-blogs.php
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Site/blog functions that work with the blogs table and related data.
*
Method wp_image_editor
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_image_editor($post_id, $msg = false) {
$nonce = wp_create_nonce("image_editor-$post_id");
$meta = wp_get_attachment_metadata($post_id);
$thumb = image_get_intermediate_size($post_id, 'thumbnail');
$sub_sizes = isset($meta['sizes']) && is_array($meta['sizes']);
Method display_rows
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
function display_rows() {
global $mode;
$status_list = array(
'archived' => array( 'site-archived', __( 'Archived' ) ),
Function svgPainter
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
wp.svgPainter = ( function( $, window, document, undefined ) {
'use strict';
var selector, base64, painter,
colorscheme = {},
elements = [];
- 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 privFileDescrParseAtt
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false)
{
$v_result=1;
// ----- For each file in the list check the attributes
- 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_translate_postdata
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
function _wp_translate_postdata( $update = false, $post_data = null ) {
if ( empty($post_data) )
$post_data = &$_POST;
- 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_ajax_add_meta
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
function wp_ajax_add_meta() {
check_ajax_referer( 'add-meta', '_ajax_nonce-add-meta' );
$c = 0;
$pid = (int) $_POST['post_id'];
$post = get_post( $pid );
- 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 analyze
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
public function analyze($filename) {
try {
if (!$this->openfile($filename)) {
return $this->info;
}
- 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 scale
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
scale: function( options ) {
var self = this;
// extend some defaults
Function scale
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
scale: function( options ) {
var self = this;
// extend some defaults
File mt.php
has 420 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Movable Type and TypePad Importer
*
* @package WordPress
Method map_meta_cap
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
function map_meta_cap( $cap, $user_id ) {
$args = array_slice( func_get_args(), 2 );
$caps = array();
switch ( $cap ) {
Method wp_get_archives
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_get_archives($args = '') {
global $wpdb, $wp_locale;
$defaults = array(
'type' => 'monthly', 'limit' => '',
File capabilities.php
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress Roles and Capabilities.
*
* @package WordPress
Function createHttpBackendMock
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
var definitions = [],
expectations = [],
responses = [],
responsesPush = angular.bind(responses, responses.push),