awslabs / aws-for-wordpress
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

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 513 units with 6,626 lines of code in units (89.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (637 lines of code)
    • 24 simple units (953 lines of code)
    • 480 very simple units (5,036 lines of code)
0% | 0% | 9% | 14% | 76%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
php0% | 0% | 10% | 14% | 74%
js0% | 0% | 0% | 8% | 91%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
admin0% | 0% | 9% | 16% | 74%
public0% | 0% | 31% | 0% | 68%
admin/partials0% | 0% | 60% | 35% | 3%
admin/js0% | 0% | 0% | 8% | 91%
includes0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
public/js0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public function content_filter()
in public/class-amazonpolly-public.php
86 20 1
public function amazon_polly_save_post()
in admin/class-amazonpolly-admin.php
38 17 3
function display_polly_gui()
in admin/partials/amazonpolly-metabox.php
64 14 1
private function show_translate_option()
in admin/AmazonAI-TranslateConfiguration.php
56 13 6
private function convert_to_audio()
in admin/class-amazonpolly-admin.php
91 13 6
public function amazon_polly_ajax_translate()
in admin/class-amazonpolly-admin.php
75 13 0
public function convert_to_audio()
in admin/AmazonAI-PollyService.php
111 12 6
public function ajax_translate()
in admin/AmazonAI-Translator.php
85 12 0
public function save_post()
in admin/AmazonAI-PollyService.php
31 11 3
public function display_polly_gui()
in admin/AmazonAI-PostMetaBox.php
50 10 1
public function display_stack_creation_options()
in admin/AmazonAI-CloudFrontConfiguration.php
83 8 0
public function break_text()
in admin/AmazonAI-Common.php
49 8 1
public function clean_text()
in admin/AmazonAI-Common.php
45 8 3
public function register_custom_fields()
in admin/class-custom-settings.php
12 8 0
function display_translate_gui()
in admin/partials/amazonpolly-metabox.php
38 7 1
36 7 0
48 7 0
public function translation_enabled_gui()
in admin/AmazonAI-TranslateConfiguration.php
35 7 0
public function run()
in admin/AmazonAI-BackgroundTask.php
19 7 0
public function amazon_polly_register_settings()
in admin/class-amazonpolly-admin.php
114 7 0