Showing 5,566 of 7,504 total issues
Function _wptexturize_pushpop_element
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function _wptexturize_pushpop_element($text, &$stack, $disabled_elements, $opening = '<', $closing = '>') {
// Check if it is a closing tag -- otherwise assume opening tag
if (strncmp($opening . '/', $text, 2)) {
// Opening? Check $text+1 against disabled elements
if (preg_match('/^' . $disabled_elements . '\b/', substr($text, 1), $matches)) {
- 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_decode
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function wp_specialchars_decode( $string, $quote_style = ENT_NOQUOTES ) {
$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_metadata
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) {
if ( !$meta_type )
return false;
$meta_cache = wp_cache_get($object_id, $meta_type . '_meta');
- 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_post_autosave
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function wp_get_post_autosave( $post_id, $user_id = 0 ) {
$revisions = wp_get_post_revisions( $post_id, array( 'check_enabled' => false ) );
foreach ( $revisions as $revision ) {
if ( false !== strpos( $revision->post_name, "{$post_id}-autosave" ) ) {
- 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 SetMessageType
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function SetMessageType() {
if(count($this->attachment) < 1 && strlen($this->AltBody) < 1) {
$this->message_type = 'plain';
} else {
if(count($this->attachment) > 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
Function get_output_format
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function get_output_format( $filename = null, $mime_type = null ) {
$new_ext = $file_ext = null;
$file_mime = null;
// By default, assume specified type takes priority
- 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_post_comments_feed_link
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function get_post_comments_feed_link($post_id = '', $feed = '') {
global $id;
if ( empty($post_id) )
$post_id = (int) $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 UTF8CharBoundary
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function UTF8CharBoundary($encodedText, $maxLength) {
$foundSplitPos = false;
$lookBack = 3;
while (!$foundSplitPos) {
$lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack);
- 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 Authenticate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function Authenticate($username, $password) {
// Start authentication
fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);
$rply = $this->get_lines();
- 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 linkFileSelect
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function linkFileSelect(scope, elem, attr, ngModel, $parse, $timeout, $compile) {
Function linkFileSelect
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function linkFileSelect(scope, elem, attr, ngModel, $parse, $timeout, $compile) {
Function linkDrop
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function linkDrop(scope, elem, attr, ngModel, $parse, $timeout, $location) {
Function linkDrop
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function linkDrop(scope, elem, attr, ngModel, $parse, $timeout, $location) {
Function $httpBackend
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
Function openSubWin
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function openSubWin(url, nm, x, y, w, h, atts) {
Function reservationController
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
var reservationController = function ($scope, $http, $q, $location, modalFactory, dataService, moment) {
Function CreateSimpleException
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Exception.CreateSimpleException = function (message, typeName, assembly, fileName, details, line, handledAt) {
Function openSubWin
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function openSubWin(url, nm, x, y, w, h, atts) {
Method add_meta_box
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default', $callback_args=null) {
Method _cat_rows
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function _cat_rows( $parent = 0, $level = 0, $categories, &$children, $page = 1, $per_page = 20, &$count ) {