Monica
Conditional Complexity

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 2,084 units with 25,183 lines of code in units (32.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (118 lines of code)
    • 8 medium complex units (487 lines of code)
    • 64 simple units (2,316 lines of code)
    • 2,011 very simple units (22,262 lines of code)
0% | <1% | 1% | 9% | 88%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
php0% | <1% | 1% | 9% | 88%
js0% | 0% | 0% | 8% | 91%
Legend:
51+
26-50
11-25
6-10
1-5
Conditional Complexity per Logical Component
primary logical decomposition
app0% | <1% | 1% | 8% | 89%
database0% | 0% | 2% | 11% | 85%
resources0% | 0% | 0% | 7% | 92%
Legend:
51+
26-50
11-25
6-10
1-5
app logical decomposition
Models0% | 5% | 1% | 3% | 88%
Console0% | 0% | 8% | 32% | 58%
Http0% | 0% | 1% | 6% | 92%
Helpers0% | 0% | 5% | 9% | 84%
Services0% | 0% | 0% | 6% | 93%
Jobs0% | 0% | 0% | 15% | 84%
Traits0% | 0% | 0% | 10% | 89%
Providers0% | 0% | 0% | 14% | 85%
ViewHelpers0% | 0% | 0% | 0% | 100%
Exceptions0% | 0% | 0% | 0% | 100%
Events0% | 0% | 0% | 0% | 100%
Listeners0% | 0% | 0% | 0% | 100%
Notifications0% | 0% | 0% | 0% | 100%
Legend:
51+
26-50
11-25
6-10
1-5
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
public function getNameAttribute()
in app/Models/Contact/Contact.php
118 37 0
protected function toArrayInternal()
in app/Http/Resources/Contact/ContactBase.php
95 19 2
private function csvToContact()
in app/Console/Commands/ImportCSV.php
80 16 3
public function handle()
in app/Console/Commands/Update.php
46 15 0
public function up()
in database/migrations/2018_05_07_070458_create_terms_table.php
78 14 0
private static function getDefaultCountryFromLocale()
in app/Helpers/CountriesHelper.php
32 14 1
public static function getDirection()
in app/Helpers/LocaleHelper.php
21 13 0
public function up()
in database/migrations/2017_12_04_165421_move_ages_data.php
96 11 0
public function getEmoji()
in app/Models/Account/Weather.php
39 11 0
public function up()
in database/migrations/2017_05_04_164723_remove_contact_encryption.php
32 10 0
public function __construct()
in app/Http/Controllers/Api/ApiController.php
35 10 0
private function setRegionalParameters()
in app/Services/User/CreateUser.php
42 10 2
private function importSocialProfile()
in app/Services/VCard/ImportVCard.php
43 10 2
public function handle()
in app/Console/Commands/PingVersionServer.php
52 10 0
public function handle()
in app/Console/Commands/ImportCSV.php
46 10 0
public function up()
in database/migrations/2018_07_08_104306_update-timestamps-timezone.php
82 9 0
private function contacts()
in app/Http/Controllers/ContactsController.php
68 9 2
public function update()
in app/Http/Controllers/ContactsController.php
71 9 2
public function list()
in app/Http/Controllers/ContactsController.php
51 9 1
private function exportContactFields()
in app/Services/VCard/ExportVCard.php
35 9 2
private function importPhoto()
in app/Services/VCard/ImportVCard.php
30 9 2
public function populateContactFields()
in app/Console/Commands/SetupTest.php
38 9 0
public function up()
in database/migrations/2019_12_21_100315_change_gift_status.php
50 8 0
public function up()
in database/migrations/2017_11_10_202620_move_addresses_from_contact_to_addresses.php
18 8 0
private function stripeCall()
in app/Traits/Subscription.php
30 8 1
public function getLocalizedName()
in app/Models/Relationship/RelationshipType.php
28 8 3
public function getAddressAsString()
in app/Models/Account/Place.php
27 8 0
public function index()
in app/Http/Controllers/Settings/SubscriptionsController.php
32 8 0
public function index()
in app/Http/Controllers/Api/Statistics/ApiStatisticsController.php
28 8 1
public static function getNameOrderForForms()
in app/Helpers/FormHelper.php
18 8 1
public static function getDefaultTimezone()
in app/Helpers/CountriesHelper.php
30 8 1
public function validate()
in app/Services/Account/Activity/Activity/CreateActivity.php
20 8 1
public function up()
in database/migrations/2017_11_10_181043_migrate_contacts_information.php
60 7 0
public function up()
in database/migrations/2019_02_09_200203_add_gender_type.php
31 7 0
public function up()
in database/migrations/2018_12_29_091017_default_temperature_scale.php
27 7 0
public function up()
in database/migrations/2019_01_05_202938_add_foreign_key_to_contacts.php
50 7 0
public function up()
in database/migrations/2018_01_27_014146_add_custom_gender.php
38 7 0
public function scopeSortedBy()
in app/Models/Contact/Contact.php
29 7 2
public function toArray()
in app/Http/Resources/Contact/ContactShort.php
41 7 1
private function importBirthday()
in app/Services/VCard/ImportVCard.php
29 7 2
private function importTel()
in app/Services/VCard/ImportVCard.php
42 7 2
public function validate()
in app/Services/Account/Activity/Activity/UpdateActivity.php
20 7 1
public function handle()
in app/Console/Commands/ImportVCards.php
22 7 1
public function handle()
in app/Console/Commands/SetUserAdmin.php
27 7 0
public function handle()
in app/Console/Commands/MigrateDatabaseCollation.php
32 7 0
public function handle()
in app/Console/Commands/SetupProduction.php
35 7 0
public function seed()
in app/Console/Commands/SetupTest.php
60 7 0
function pluralE()
in resources/js/pluralization.js
5 7 2
public function up()
in database/migrations/2018_09_05_213507_mark_modules_migrated.php
21 6 0
public function up()
in database/migrations/2018_04_13_131008_fix-contacts-data.php
22 6 0