File SQ_Tools.php
has 386 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Handles the parameters and url
*
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 getBrowserInfo
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getBrowserInfo() {
$u_agent = $_SERVER['HTTP_USER_AGENT'];
$bname = 'Unknown';
$platform = 'Unknown';
$version = "";
Function getBrowserInfo
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function getBrowserInfo() {
$u_agent = $_SERVER['HTTP_USER_AGENT'];
$bname = 'Unknown';
$platform = 'Unknown';
$version = "";
- 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 dump
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function dump() {
$output = '';
$callee = array('file' => '', 'line' => '');
if (function_exists('func_get_args')) {
$arguments = func_get_args();
- 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 sq_remote_get
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function sq_remote_get($url, $param = array()) {
$cookies = '';
$post_preview = false;
$cookies = array();
$cookie_string = '';
- 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 getOptions
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getOptions() {
$default = array(
'sq_beginner_user' => 1,
'sq_api' => '',
'sq_use' => 0,
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 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
Method dump
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function dump() {
$output = '';
$callee = array('file' => '', 'line' => '');
if (function_exists('func_get_args')) {
$arguments = func_get_args();
Function checkDebug
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function checkDebug() {
//if debug is called
if (self::getIsset('sq_debug')) {
- 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 sq_remote_get
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function sq_remote_get($url, $param = array()) {
$cookies = '';
$post_preview = false;
$cookies = array();
$cookie_string = '';
Function getSnippet
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function getSnippet($url) {
if ($url == '' || !function_exists('preg_match'))
return;
$snippet = array();
$length = array('title' => 66,
- 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 getBadLinkStructure
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function getBadLinkStructure() {
global $wp_rewrite;
if (function_exists('apache_get_modules')) {
//Check if mod_rewrite is installed in apache
if (!in_array('mod_rewrite', apache_get_modules()))
- 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"