Showing 5,566 of 7,504 total issues
Akismet
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
class Akismet {
const API_HOST = 'rest.akismet.com';
const API_PORT = 80;
const MAX_DELAY_BEFORE_MODERATION_EMAIL = 86400; // One day in seconds
WP_Theme
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
final class WP_Theme implements ArrayAccess {
/**
* Headers for style.css files.
*
Function collection
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
wp.media.collection = function(attributes) {
var collections = {};
return _.extend( attributes, {
coerce : wp.media.coerce,
Function _transitions
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
_transitions = (function() {
var _slide = function(params, complete, fade, door) {
var easing = this.getOptions('easing'),
Function _transitions
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
_transitions = (function() {
var _slide = function(params, complete, fade, door) {
var easing = this.getOptions('easing'),
File misc.php
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Misc WordPress Administration API.
*
* @package WordPress
File jquery-migrate.js
has 379 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery Migrate - v1.2.1 - 2013-05-08
* https://github.com/jquery/jquery-migrate
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
*/
Function extract
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function extract()
{
$v_result=1;
// ----- Reset the error handler
- 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_read_image_metadata
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function wp_read_image_metadata( $file ) {
if ( !file_exists( $file ) )
return false;
list(,,$sourceImageType) = getimagesize( $file );
- 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_restore_image
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function wp_restore_image($post_id) {
$meta = wp_get_attachment_metadata($post_id);
$file = get_attached_file($post_id);
$backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true );
$restored = 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 diff
has a Cognitive Complexity of 34 (exceeds 5 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'));
- 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 Serializer
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Serializer = (function () {
function Serializer() {
}
Serializer.serialize = function (input) {
var output = Serializer._serializeObject(input, "root");
File theme-install.php
has 378 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress Theme Install Administration API
*
* @package WordPress
Function initSortables
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
initSortables : function() {
var currentDepth = 0, originalDepth, minDepth, maxDepth,
prev, next, prevBottom, nextThreshold, helperHeight, transport,
menuEdge = api.menuList.offset().left,
body = $('body'), maxChildDepth,
Method sanitize
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function sanitize($data, $type, $base = '')
{
$data = trim($data);
if ($data !== '' || $type & SIMPLEPIE_CONSTRUCT_IRI)
{
Method get_pages
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
function &get_pages($args = '') {
global $wpdb;
$defaults = array(
'child_of' => 0, 'sort_order' => 'ASC',
Function updateHtml
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateHtml(html, data, updateAll) {
var writer = new tinymce.html.Writer();
var sourceCount = 0, hasImage;
function setAttributes(attrs, updatedAttrs) {
Function update
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
update : function() {
var t = this, f = document.forms[0], ed = tinyMCEPopup.editor, el, b, fixSafari = null, DL, P, A, DIV, do_caption = null, img_class = f.img_classes.value, html;
tinyMCEPopup.restoreSelection();
el = ed.selection.getNode();
Method get
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function get( $hook_name = '' ) {
if ( is_a( $hook_name, 'WP_Screen' ) )
return $hook_name;
Method wp_mail
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
// Compact the input, apply the filters, and extract them back out
extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ) );
if ( !is_array($attachments) )