Web.Admin/2014/wordpress/wp-admin/includes/schema.php
File schema.php
has 444 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* WordPress Administration Scheme API
*
* Here we keep the DB structure and option values.
Method populate_options
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function populate_options() {
global $wpdb, $wp_db_version;
$guessurl = wp_guess_url();
Method populate_roles_160
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function populate_roles_160() {
// Add roles
// Dummy gettext calls to get strings in the catalog.
/* translators: user role */
Function populate_options
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
function populate_options() {
global $wpdb, $wp_db_version;
$guessurl = wp_guess_url();
- 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 populate_roles_210
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function populate_roles_210() {
$roles = array('administrator', 'editor');
foreach ($roles as $role) {
$role =& get_role($role);
if ( empty($role) )
Function populate_roles_210
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
function populate_roles_210() {
$roles = array('administrator', 'editor');
foreach ($roles as $role) {
$role =& get_role($role);
if ( empty($role) )
- 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"