Showing 5 of 7 total issues
Function exports
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (grunt) {
/**
* Files added to WordPress SVN, don't include 'assets/**' here.
* @type {Array}
Method render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render() {
global $wp_scripts, $wp_styles;
$loaded_scripts = array_merge( $wp_scripts->done, $wp_scripts->in_footer );
$loaded_scripts = array_unique( $loaded_scripts );
Function ps_listdeps_has_parent_plugin
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function ps_listdeps_has_parent_plugin() {
$file = plugin_basename( __FILE__ );
if ( is_admin() && ( ! class_exists( 'Debug_Bar' ) && current_user_can( 'activate_plugins' ) ) && is_plugin_active( $file ) ) {
add_action( 'admin_notices', create_function( null, 'echo \'<div class="error"><p>\', sprintf( __( \'Activation failed: Debug Bar must be activated to use the <strong>Debug Bar List Dependencies</strong> Plugin. <a href="%s">Visit your plugins page to install & activate</a>.\', \'debug-bar-list-dependencies\' ), admin_url( \'plugin-install.php?tab=search&s=debug+bar\' ) ), \'</p></div>\';' ) );
- 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 load_textdomain
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function load_textdomain( $domain ) {
if ( function_exists( '_load_textdomain_just_in_time' ) ) {
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 render_table_row
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function render_table_row( $row_nr, $item, $dependencies, $src ) {
echo '<tr><td>', (int) $row_nr, '</td><td>',
esc_html( $item ),
'</td><td>';
- 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"