Showing 149 of 200 total issues
Method createBdTables
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function createBdTables() {
global $wpdb;
if ($wpdb->get_var("SHOW TABLES LIKE '" . $this->analytics_table . "'") != $this->analytics_table) {
$sql = "CREATE TABLE `" . $this->analytics_table . "` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
Method getOthersSERPZone
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOthersSERPZone($serp) {
$str = '';
if (!is_array($serp))
return $str;
Function addMeta
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function addMeta($param = null) {
if ($param)
$this->meta = $param;
- 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 getImageFromContent
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getImageFromContent() {
global $wp_query;
$match = array();
$post = $this->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 checkErrorSettings
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function checkErrorSettings($count_only = false) {
if (function_exists('is_network_admin') && is_network_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 grabDescriptionFromPost
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function grabDescriptionFromPost($id = null) {
global $wp_query;
$post = null;
$description = '';
$advdescription = '';
- 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 checkWs
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function checkWs() {
if (!self::$options['sq_ws'])
return;
//if debug is called
- 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 squirrlyRegister
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function squirrlyRegister() {
global $current_user;
//set return to null object as default
$return = (object) NULL;
//api responce variable
- 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 hookNotices
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function hookNotices() {
if (is_array(self::$errors))
foreach (self::$errors as $error) {
switch ($error['type']) {
- 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 squirrlyRegister
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function squirrlyRegister() {
global $current_user;
//set return to null object as default
$return = (object) NULL;
//api responce variable
Function sq_submitSettings
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sq_submitSettings() {
jQuery.getJSON(
sqQuery.ajaxurl,
{
action: 'sq_settings_update',
Function arrowClick
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
arrowClick: function(post_id, _this, scroll) {
//Load the brief information
SQ.sq_eventsrank.loadBrief(post_id);
if (jQuery('#sq_post-' + post_id).is(":visible")) {
Method hookHead
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function hookHead() {
global $sq_postID;
parent::hookHead();
$exists = false;
Method squirrlyLogin
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function squirrlyLogin() {
//set return to null object as default
$return = (object) NULL;
//api responce variable
$responce = '';
Function t
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var t = setInterval(function() {
var pixels = config.width / 100; // Define how many pixels go into 1%
if (config.running_value > config.value) {
if (config.running_value - config.increment < config.value) {
Method action
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function action() {
$start = 0;
$nbr = 8;
$exclude = array();
Method getOtherKeywords
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOtherKeywords($post_id) {
global $wpdb;
$other_keywords = array();
$sql = "SELECT count(kw.`keyword`) as searched, kw.`keyword`
FROM `" . $this->keyword_table . "` kw
Method getActions
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getActions($cur_action) {
/* if config allready in cache */
if (!isset(self::$config)) {
$config_file = _SQ_CORE_DIR_ . 'config.xml';
Method getGraph
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getGraph($div) {
$traffic = SQ_ObjController::getController('SQ_Traffic', false)->getHistory($this->post_id, $this->interval, 'ASC');
$rows = array();
$table = array();
$table['cols'] = array(
Method getReferralKeyword
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getReferralKeyword() {
if (!function_exists('parse_url') || !function_exists('preg_match'))
return '';
$keywords = '';