Showing 149 of 200 total issues
Method action
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function action() {
parent::action();
switch (SQ_Tools::getValue('action')) {
Function getCustomTitle
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function getCustomTitle() {
global $wp_query;
$count = 0;
$title = '';
$optitle = '';
- 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 action
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function action() {
parent::action();
switch (SQ_Tools::getValue('action')) {
case 'sq_feedback':
- 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
SQ_Tools
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class SQ_Tools extends SQ_FrontController {
/** @var array Saved options in database */
public static $options = array();
Method getCanonicalUrl
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getCanonicalUrl() {
global $wp_query;
if (!isset($wp_query) || $wp_query->is_404 || $wp_query->is_search) {
return false;
Method hookMenu
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function hookMenu() {
$this->upgradeRedirect();
$first_page = preg_replace('/\s/', '_', _SQ_NAME_);
SQ_Tools::checkErrorSettings(true);
Function action
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function action() {
parent::action();
switch (SQ_Tools::getValue('action')) {
- 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 action
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function action() {
parent::action();
switch (SQ_Tools::getValue('action')) {
case 'sq_feedback':
Method grabKeywordsFromPost
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function grabKeywordsFromPost($id = null) {
global $wp_query;
$this->max_keywrods = ($this->max_keywrods > 0 ? ($this->max_keywrods - 1) : 0);
if ($this->max_keywrods == 0)
Method action
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function action() {
parent::action();
switch (SQ_Tools::getValue('action')) {
Function action
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function action() {
parent::action();
switch (SQ_Tools::getValue('action')) {
- 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 add_row
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function add_row($column, $post_id) {
$title = '';
$description = '';
$frontend = null;
$cached = 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
Method addFavicon
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addFavicon($file, $path = ABSPATH) {
$out = array();
$out['name'] = strtolower(basename($file['name']));
$out['tmp'] = _SQ_CACHE_DIR_ . strtolower(basename($file['name']));
$out['favicon'] = $path . "/" . 'favicon.ico';
File sq_menu.js
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
jQuery(document).ready(function() {
var snippet_timeout;
jQuery("#sq_goto_dashboard").bind('click', function() {
location.href = "?page=sq_dashboard";
});
Function sq_autoLogin
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sq_autoLogin(){
if (!checkEmail(jQuery('#sq_email').val())){
jQuery('#sq_blocklogin').find('.sq_error').html(__invalid_email);
jQuery('#sq_register_email').show();
jQuery('#sq_register').html(__try_again);
Function setHeader
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function setHeader() {
global $wp_query;
$ret = '';
$this->post = $wp_query->get_queried_object();
$this->meta['blogname'] = get_bloginfo('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
File sq_rank.js
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function() {
var SQ = this;
if (typeof this.sq_dashurl == 'undefined')
if (typeof sq_dashurl !== 'undefined')
Function saveVisit
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function saveVisit() {
global $wpdb, $wp_query;
$post_id = 0;
$home = 0;
$sql = '';
- 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 hookFrontcontent
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function hookFrontcontent($content) {
if (!is_feed())
return $content;
- 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 getCustomDescription
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getCustomDescription() {
global $wp_query;
$sep = '|';
$description = '';