Showing 194 of 194 total issues
Function getToolbarOffset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getToolbarOffset() {
const toolbar = document.getElementById( 'wpadminbar' );
if ( ! toolbar ) {
if ( document.body.classList.contains( 'admin-bar' ) ) {
- 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 __construct
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function __construct( $handle, $uri, array $args = array() ) {
$this->handle = (string) $handle;
$this->uri = (string) $uri;
$defaults = $this->get_defaults();
- 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 __call
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function __call( $method, $args ) {
switch ( $method ) {
case 'trigger_init':
if ( empty( $args ) ) {
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 register_customize_controls_js
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function register_customize_controls_js( $assets ) {
$data = array(
'groups' => array(),
'fonts' => array(),
'fontFamilyGroups' => array(),
- 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 display_field_for_post
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function display_field_for_post( $field, $post = null ) {
if ( ! isset( $this->fields[ $field ] ) ) {
return 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 get_families
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function get_families() {
if ( null === $this->families ) {
$slug = $this->get_slug();
$this->families = get_transient( 'super_awesome_theme_' . SUPER_AWESOME_THEME_VERSION . '_' . $slug . '_fonts' );
- 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 group_webfonts
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function group_webfonts( $fonts ) {
$font_families = $this->get_dependency( 'font_families' );
$webfonts = array();
- 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 register_customize_controls_js
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function register_customize_controls_js( $assets ) {
$data = array(
'groups' => array(),
'colors' => array(),
'footerWidgetAreas' => super_awesome_theme( 'footer_widget_areas' )->get_widget_area_names(),
- 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 super_awesome_theme_ajaxify_comments_warning
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function super_awesome_theme_ajaxify_comments_warning() {
// 'deactivate_plugins' is not available in WordPress < 4.9.
if ( version_compare( $GLOBALS['wp_version'], '4.9', '<' ) ) {
if ( ! current_user_can( 'activate_plugins' ) ) {
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
TODO found Open
TODO: codeclimate.yml, PHPCS, PHPMD
- Exclude checks
TODO found Open
/* TODO: add_filter( 'edd_get_option_disable_styles', '__return_true' ); */
- Exclude checks
TODO found Open
/* TODO: Add theme support for starter content. */
- Exclude checks
TODO found Open
TODO: Implement these active callbacks via JavaScript. Then remove this method.
- Exclude checks
TODO found Open
/* TODO: add_filter( 'torro_load_frontend_css', '__return_false' ); */
- Exclude checks