Showing 5,566 of 7,504 total issues
Method wp_validate_auth_cookie
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_validate_auth_cookie($cookie = '', $scheme = '') {
if ( ! $cookie_elements = wp_parse_auth_cookie($cookie, $scheme) ) {
do_action('auth_cookie_malformed', $cookie, $scheme);
return false;
}
Method split_ns
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function split_ns($string)
{
static $cache = array();
if (!isset($cache[$string]))
{
Method get_image_url
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_image_url()
{
if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'image'))
{
return $this->sanitize($return[0]['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI);
Method standalone_value
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function standalone_value()
{
if ($standalone = $this->get_value())
{
switch ($standalone)
Method set_scheme
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function set_scheme($scheme)
{
if ($scheme === null || $scheme === '')
{
$this->scheme = null;
Method wp_scheduled_delete
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_scheduled_delete() {
global $wpdb;
$delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS);
Method call
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function call($methodname, $args) {
if (!$this->hasMethod($methodname)) {
return new IXR_Error(-32601, 'server error. requested method '.
$methodname.' does not exist.');
}
Method wp_signon
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_signon( $credentials = '', $secure_cookie = '' ) {
if ( empty($credentials) ) {
if ( ! empty($_POST['log']) )
$credentials['user_login'] = $_POST['log'];
if ( ! empty($_POST['pwd']) )
Method iis7_url_rewrite_rules
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function iis7_url_rewrite_rules($add_parent_tags = false, $indent = " ", $end_of_line = "\n") {
if ( ! $this->using_permalinks()) {
return '';
}
Method parse
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse() {
set_error_handler(array(&$this, 'error_handler'));
array_unshift($this->ns_contexts, array());
Method Help
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Help($keyword="") {
$this->error = null; # to avoid confusion
if(!$this->connected()) {
$this->error = array(
Method MsgHTML
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MsgHTML($message,$basedir='') {
preg_match_all("/(src|background)=\"(.*)\"/Ui", $message, $images);
if(isset($images[2])) {
foreach($images[2] as $i => $url) {
// do not change urls for absolute images (thanks to corvuscorax)
Method GetTableNameFor
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public string GetTableNameFor(string typeName)
{
typeName = typeName.ToLower();
string currentTableName;
if (_cachedTableNames.ContainsKey(typeName))
Function initializeAppInsights
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function initializeAppInsights() {
try {
if (typeof window !== "undefined" && typeof JSON !== "undefined") {
var aiName = "appInsights";
if (window[aiName] === undefined) {
- 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 insert
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
insert: function(element, insertions) {
element = $(element);
if (Object.isString(insertions) || Object.isNumber(insertions) ||
Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
- 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 nth
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
nth: function(fragment, m) {
var mm, formula = m[6], predicate;
if (formula == 'even') formula = '2n+0';
if (formula == 'odd') formula = '2n+1';
if (mm = formula.match(/^(\d+)$/)) // digit only
- 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 readAttribute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
readAttribute: function(element, name) {
element = $(element);
if (Prototype.Browser.IE) {
var t = Element._attributeTranslations.read;
if (t.values[name]) return t.values[name](element, 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 cumulativeOffset
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Element.Methods.cumulativeOffset = function(element) {
var valueT = 0, valueL = 0;
do {
valueT += element.offsetTop || 0;
valueL += element.offsetLeft || 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 moveForm
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
moveForm : function(commId, parentId, respondId, postId) {
var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent'), post = t.I('comment_post_ID');
if ( ! comm || ! respond || ! cancel || ! parent )
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 applyMinDimension
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
},applyMinDimension:function(_2a,_2b,_2c,_2d){
if((_2a.a2-_2a.a1)<_2b){
if(_2c==1){
_2a.a2=_2a.a1+_2b;
}else{
- 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"