Showing 5,566 of 7,504 total issues
Function wp_user_settings
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function wp_user_settings() {
if ( ! is_admin() )
return;
- 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_usermeta
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function get_usermeta( $user_id, $meta_key = '') {
global $wpdb;
$user_id = (int) $user_id;
if ( !$user_id )
- 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_dropdown_users
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function wp_dropdown_users( $args = '' ) {
global $wpdb;
$defaults = array(
'show_option_all' => '', 'show_option_none' => '',
'orderby' => 'display_name', 'order' => 'ASC',
- 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_specialchars
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
$string = (string) $string;
if ( 0 === strlen( $string ) ) {
return '';
- 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_boundary_post
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function get_boundary_post($in_same_cat = false, $excluded_categories = '', $start = true) {
global $post, $wpdb;
if ( empty($post) || !is_single() || is_attachment() )
return null;
- 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 send_through_proxy
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function send_through_proxy( $uri ) {
// parse_url() only handles http, https type URLs, and will emit E_WARNING on failure.
// This will be displayed on blogs, which is not reasonable.
$check = @parse_url($uri);
- 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 Handle
has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring. Open
public IEnumerable Handle(Func<Guid, ParticipantAggregate> al, UpdateParticipant command)
{
var agg = al(command.Id);
if (agg.Name != command.Name)
- 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 make_thumb
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function make_thumb($folder,$file,$dest,$thumb_width) {
$ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
switch($ext)
- 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_attachment_link
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function get_attachment_link($id = false) {
global $post, $wp_rewrite;
$link = 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
Function $interval
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
var $interval = function(fn, delay, count, invokeApply) {
var hasParams = arguments.length > 4,
args = hasParams ? Array.prototype.slice.call(arguments, 4) : [],
iteration = 0,
skipApply = (angular.isDefined(invokeApply) && !invokeApply),
Function format
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
UrlMatcher.prototype.format = function (values) {
values = values || {};
var segments = this.segments, params = this.parameters(), paramset = this.params;
if (!this.validates(values)) return null;
Function bind
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind: function( elem, value ) {
// todo: revise if alternative tooltip is needed for mobile devices
if (Galleria.TOUCH) {
return;
Function raise
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.raise = function( msg, fatal ) {
var type = fatal ? 'Fatal error' : 'Error',
css = {
Function attachments
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
attachments: function( shortcode ) {
var shortcodeString = shortcode.string(),
result = collections[ shortcodeString ],
attrs, args, query, others, self = this;
Function update
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function update(resetKeyPress) {
if (!shown) return;
$box.css({ left: viewX(selection.x1), top: viewY(selection.y1) })
.add($area).width(w = selection.width).height(h = selection.height);
Function initialize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize: function( id, options ) {
var control = this,
nodes, radios, settings;
this.params = {};
Function init
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init() {
var ed, tcont;
tinyMCEPopup.resizeToInnerSize();
ed = tinyMCEPopup.editor;
Function baseInitialize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
baseInitialize: function(element, update, options) {
element = $(element)
this.element = element;
this.update = $(update);
this.hasFocus = false;
Function bind
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind: function( elem, value ) {
// todo: revise if alternative tooltip is needed for mobile devices
if (Galleria.TOUCH) {
return;
Function raise
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.raise = function( msg, fatal ) {
var type = fatal ? 'Fatal error' : 'Error',
css = {