Code Analysis: BP Attachments 1.2.0

Function Rating Maintainability Complexity Lines of code
BP_Attachments_REST_Controller::get_items()
C
30 26 113
BP_Medium::get_instance()
C
33 27 87
bp_attachments_media_user_can()
C
37 28 66
BP_Attachments_Component::parse_query()
C
34 26 83
BP_Attachments_REST_Controller::create_item()
C
31 20 125
bp_attachments_delete_directory()
B
37 22 68
bp_attachments_create_media()
B
37 22 67
bp_attachments_tracking_retrieve_records()
B
37 18 71
BP_Attachments_Media::upload_dir_filter()
A
39 13 71
BP_Attachments_Media::validate_upload()
A
41 14 56
BP_Attachments_REST_Controller::prepare_item_for_filesystem()
A
49 14 30
BP_Attachments_REST_Controller::get_item_schema()
A
29 2 195
bp_attachments_activity_attach_media()
A
42 11 55
bp_attachments_enable_private_uploads_callback()
A
40 10 68
BP_Attachments_REST_Controller::delete_item()
A
43 11 50
BP_Attachments_OEmbed_Extension::validate_url_to_item_id()
A
41 10 57
BP_Attachments_Media::make_dir()
A
46 11 36
bp_attachments_enqueue_medium_view_assets()
A
38 7 83
bp_attachments_allowed_media_types_callback()
A
39 7 83
bp_attachments_download_media()
A
46 10 36
bp_attachments_sanitize_media()
A
49 10 29
bp_attachments_get_medium_output()
A
48 9 38
bp_attachments_get_allowed_media_exts()
A
50 9 29
BP_Attachments_Tracking_REST_Controller::get_item_schema()
A
34 3 113
bp_attachments_get_private_root_dir()
A
44 7 49
BP_Attachments_REST_Controller::update_item()
A
47 7 38
bp_attachments_set_media_blocks_attached_activity()
A
55 8 18
bp_attachments_get_block_attachment_data()
A
49 7 31
BP_Attachments_Component::includes()
S
51 7 29
BP_Attachments_Component::add_rewrite_rules()
S
45 6 43
BP_Attachments_Component::setup_nav()
S
51 7 25
bp_attachments_list_member_root_objects()
S
47 6 37
BP_Attachments_REST_Controller::register_routes()
S
36 1 108
bp_attachments_list_member_media_libraries()
S
41 4 62
bp_attachments_get_media_uploads_dir()
S
49 6 32
BP_Attachments_Component::blocks_init()
S
48 6 31
BP_Attachments_Component::add_permastructs()
S
50 6 30
bp_attachments_messages_attach_media()
S
50 6 28
bp_attachments_get_medium_path()
S
50 6 26
bp_attachments_render_file_attachment()
S
48 5 39
bp_attachments_update_medium_attached_items()
S
53 6 23
BP_Attachments_Profile_Image_REST_Controller::create_item_permissions_check()
S
47 5 38
bp_attachments_tracking_erase_deleted_medium()
S
48 5 35
bp_attachments_member_header_buttons()
S
57 6 19
BP_Attachments_Profile_Image_REST_Controller::create_item()
S
44 4 48
bp_attachments_is_community_media_directory()
S
62 7 9
bp_attachments_profile_images_enqueue_front_end_assets()
S
46 4 45
bp_attachments_profile_images_template_part_overrides()
S
60 6 13
BP_Attachments_Component::setup_globals()
S
45 4 40
bp_attachments_tracking_rendered_media_item_content()
S
54 5 24
BP_Attachments_Tracking_REST_Controller::prepare_item_for_response()
S
46 4 39
bp_attachments_member_header_actions()
S
53 5 24
BP_Attachments_Component::add_rewrite_tags()
S
49 4 35
bp_attachments_get_medium_url()
S
47 4 35
bp_attachments_get_exts_by_medialist()
S
57 5 17
bp_attachments_destroy_queried_object()
S
58 5 15
bp_attachments_admin_bp_page_updated_clean_rewrite_rules()
S
64 6 9
bp_attachments_activity_nouveau_register_scripts()
S
62 6 10
BP_Attachments_OEmbed_Extension::set_permalink()
S
59 5 15
bp_attachments_get_directory_types()
S
45 3 44
bp_attachments_get_directory_icon()
S
59 5 13
bp_attachments_list_dir_media()
S
51 4 27
bp_attachments_tracking_record_created_medium()
S
52 4 25
bp_attachments_get_serialized_medium_block()
S
52 4 25
BP_Attachments_REST_Controller::get_medium_json_data()
S
52 4 23
bp_attachments_update_medium()
S
54 4 20
bp_attachments_format_file_size()
S
55 4 20
bp_attachments_tracking_install()
S
57 4 19
BP_Attachments_OEmbed_Extension::set_fallback_html()
S
54 4 19
bp_attachments_displayed_user_url()
S
57 4 17
bp_attachments_loggedin_user_url()
S
57 4 17
bp_attachments_medium_classes()
S
62 5 10
bp_attachments_tracking_exclude_from_activities()
S
62 5 10
bp_attachments_activity_loader()
S
65 5 8
bp_attachments_get_allowed_media_mimes()
S
60 4 14
bp_attachments_template_part_overrides()
S
59 4 14
bp_attachments_get_medium_visibility()
S
61 4 13
bp_attachments_medium_get_description()
S
64 4 11
bp_attachments_messages_enqueue_front_end_assets()
S
47 2 41
BP_Attachments_OEmbed_Extension::filter_embed_url()
S
62 4 11
BP_Attachments_OEmbed_Extension::filter_the_permalink()
S
62 4 11
BP_Attachments::autoload()
S
61 4 11
bp_attachments_activity_register_front_end_assets()
S
47 2 40
bp_attachments_set_dummy_post()
S
54 3 22
bp_attachments_admin_plugin_action_links()
S
55 3 21
BP_Attachments_Component::setup_title()
S
55 3 21
bp_attachments_get_i18n_media_type()
S
55 3 19
BP_Attachments_REST_Controller::get_collection_params()
S
49 2 33
bp_attachments_register_front_end_assets()
S
51 2 33
bp_attachments_medium_get_owner_avatar()
S
57 3 17
bp_attachments_render_video_attachment()
S
57 3 17
BP_Attachments_Tracking_REST_Controller::get_collection_params()
S
45 1 47
bp_attachments_render_audio_attachment()
S
57 3 17
bp_attachments_render_image_attachment()
S
58 3 16
bp_attachments_sanitize_allowed_media_types()
S
63 4 10
bp_attachments_is_media_playlist_view()
S
64 4 9
bp_attachments_is_media_list_view()
S
64 4 9
BP_Attachments::start()
S
65 4 9
BP_Attachments_Component::late_includes()
S
65 4 10
BP_Attachments_Component::admin_directory_states()
S
62 4 10
bp_attachments_medium_get_action()
S
59 3 15
bp_attachments_set_media_attached_messages_thread()
S
64 4 9
bp_attachments_enqueue_media_library()
S
51 2 29
bp_attachments_enqueue_tracking_assets()
S
51 2 29
BP_Attachments_Component::register_nav()
S
51 2 29
bp_attachments_register_settings()
S
48 1 44
bp_attachments_medium_embed_inline_styles()
S
60 3 13
bp_attachments_locate_template_asset()
S
61 3 13
BP_Attachments_REST_Controller::get_items_permissions_check()
S
60 3 13
BP_Attachments::is_buddypress_active()
S
60 3 13
bp_attachments_list_media_in_directory()
S
61 3 12
BP_Attachments_Profile_Image_REST_Controller::register_routes()
S
47 1 42
BP_Attachments_OEmbed_Extension::set_oembed_response_data()
S
61 3 12
BP_Attachments_Profile_Image_REST_Controller::get_item_schema()
S
52 2 26
BP_Attachments_Component::setup_admin_bar()
S
52 2 26
bp_attachments_tracking_register_assets()
S
55 2 23
BP_Attachments_Tracking_REST_Controller::get_items()
S
54 2 22
bp_attachments_tracking_get_directory_nav_items()
S
55 2 20
bp_attachments_register_common_assets()
S
50 1 34
bp_attachments_activity_button()
S
58 2 17
bp_attachments_tracking_unregister_common_scripts()
S
59 2 17
bp_attachments_get_medium_owner_mentionname()
S
67 3 8
bp_attachments_get_medium_owner_displayname()
S
67 3 8
bp_attachments_admin_bp_page_mapped_clean_rewrite_rules()
S
72 3 5
bp_attachments_medium_owner_has_description()
S
66 3 8
bp_attachments_medium_owner_description()
S
68 3 7
bp_attachments_medium_get_view_url()
S
67 3 8
bp_attachments_medium_get_modified_date()
S
66 3 8
bp_attachments_medium_get_size()
S
67 3 8
bp_attachments_medium_get_mime_type()
S
67 3 8
bp_attachments_enqueue_front_end_assets()
S
67 3 8
bp_attachments_medium_get_title()
S
67 3 8
bp_attachments_get_features()
S
66 3 9
bp_attachments_version_updater()
S
69 3 7
bp_attachments_tracking_render_action()
S
65 3 9
bp_attachments_is_file_type_allowed()
S
63 3 10
bp_attachments_messages_loader()
S
68 3 7
bp_attachments_screen_directory_index()
S
68 3 7
bp_attachments_member_meta()
S
65 3 9
bp_attachments_member_type_list()
S
59 2 15
bp_attachments_get_src()
S
64 3 9
BP_Attachments_Component::rest_api_init()
S
64 3 10
BP_Attachments_OEmbed_Extension::is_page()
S
66 3 8
BP_Attachments_Tracking_REST_Controller::prepare_links()
S
59 2 15
bp_attachments_set_directory_theme_compat()
S
70 3 6
bp_attachments_is_medium_view()
S
68 3 7
bp_attachments_is_medium_download()
S
68 3 7
bp_attachments_is_medium_embed()
S
68 3 7
bp_attachments_medium_get_owner_url()
S
67 3 8
BP_Attachments_REST_Controller::delete_item_permissions_check()
S
59 2 14
bp_attachments_get_component_info()
S
61 2 14
bp_attachments_tracking_output_directory_nav()
S
60 2 14
bp_attachments_tracking_get_action()
S
60 2 14
bp_attachments_admin_menu()
S
61 2 14
BP_Attachments_REST_Controller::update_item_permissions_check()
S
59 2 14
BP_Attachments::admin_notice()
S
61 2 13
BP_Attachments_REST_Controller::create_item_permissions_check()
S
61 2 13
bp_attachments_after_member_header()
S
64 2 12
bp_attachments_medium_title()
S
63 2 12
BP_Attachments_Media::__construct()
S
52 1 26
bp_attachments_set_content_template()
S
63 2 11
bp_attachments_profile_images_register_front_end_assets()
S
54 1 25
bp_attachments_get_default_allowed_media_types()
S
55 1 24
bp_attachments_get_medium_download_url()
S
67 2 8
bp_attachments_is_cover_image_front_edit()
S
71 2 6
bp_attachments_current_medium_visibility()
S
70 2 7
BP_Attachments::activate()
S
64 2 10
bp_attachments_get_item_action_slug()
S
68 2 8
BP_Attachments_Tracking_REST_Controller::register_routes()
S
60 1 15
bp_attachments_medium_fallback_text()
S
70 2 6
bp_attachments_component()
S
71 2 6
bp_attachments_medium_get_login_url()
S
70 2 7
bp_attachments_get_queried_object()
S
68 2 8
BP_Medium::__construct()
S
73 2 5
bp_attachments_is_user_personal_library()
S
79 2 3
bp_attachments_get_queried_vars()
S
68 2 8
BP_Attachments_Component::setup_actions()
S
65 2 8
bp_attachments_get_item_action_key()
S
67 2 8
BP_Attachments::deactivate()
S
64 2 10
bp_attachments_medium_description()
S
65 2 9
bp_attachments_get_user_url()
S
66 2 9
bp_attachments_user_decrease_files_size()
S
64 2 10
bp_attachments_get_media_exts_by_allowed_types()
S
67 2 8
bp_attachments_tracking_render_media()
S
67 2 8
bp_attachments_use_experimental_features()
S
74 2 4
bp_attachments_register_rest_user_field()
S
60 1 15
bp_attachments_member_has_meta()
S
69 2 7
bp_attachments_current_medium_action()
S
70 2 7
BP_Attachments_Component::very_late_includes()
S
72 2 5
bp_attachments_get_document_root()
S
69 2 7
bp_attachments_before_member_header()
S
72 2 5
bp_attachments_get_medium_type()
S
68 2 8
bp_attachments_is_avatar_front_edit()
S
71 2 6
BP_Attachments_REST_Controller::prepare_item_for_response()
S
64 2 9
bp_attachments_get_vignette_uri()
S
68 2 7
bp_attachments_get_medium_part()
S
69 2 7
bp_attachments_get_user_slug()
S
66 2 9
bp_attachments_user_media_caps()
S
61 1 14
bp_attachments_register_user_meta()
S
60 1 14
bp_attachments_medium_owner_avatar()
S
62 1 14
bp_attachments_register_admin_assets()
S
64 1 12
BP_Attachments_Component::__construct()
S
62 1 12
bp_attachments_block_category()
S
63 1 12
bp_attachments_get_serialized_block()
S
64 1 11
bp_attachments_medium_action()
S
65 1 11
bp_attachments_member_after_meta()
S
82 1 3
bp_attachments_clear_cache()
S
70 1 5
bp_attachments_get_item_visibilities()
S
70 1 6
BP_Attachments_Profile_Image_REST_Controller::get_items_permissions_check()
S
66 1 9
bp_attachments_get_medium()
S
80 1 3
bp_attachments_get_directory_common_props()
S
65 1 10
bp_attachments_block_editor_settings()
S
66 1 8
bp_attachments_medium_owner_url()
S
81 1 3
bp_attachments_member_after_edit_cover_image()
S
82 1 3
bp_attachments_install()
S
71 1 6
bp_attachments_get_javascript_template()
S
74 1 5
BP_Attachments_Component::setup_cache_groups()
S
70 1 8
bp_attachments_tracking_set_directory_page_default_title()
S
68 1 8
bp_attachments_tracking_get_meta_table()
S
79 1 3
bp_attachments_block_get_supported_block_names()
S
82 1 3
bp_attachments_medium_modified_date()
S
81 1 3
bp_attachments_get_item_actions()
S
68 1 7
bp_attachments_member_before_edit_cover_image()
S
82 1 3
bp_attachments_get_public_uploads_dir()
S
81 1 3
bp_attachments_get_templates_dir()
S
82 1 3
bp_attachments_get_allowed_media_types()
S
80 1 3
bp_attachments_medium_has_description()
S
80 1 3
bp_attachments_is_install()
S
80 1 3
bp_attachments_is_avatar_uploads_enabled()
S
80 1 3
bp_attachments_admin_load_settings()
S
68 1 9
bp_attachments_settings_section_callback()
S
83 1 3
bp_attachments_activity_after_post_form()
S
80 1 3
bp_attachments_messages_prepend_button()
S
76 1 5
BP_Attachments_Tracking_REST_Controller::__construct()
S
74 1 4
BP_Attachments_REST_Controller::__construct()
S
75 1 4
bp_attachments_is_update()
S
72 1 5
bp_attachments_user_get_files_size()
S
74 1 4
bp_attachments()
S
82 1 3
bp_attachments_messages_allowed_tags()
S
67 1 10
BP_Attachments_Profile_Image_REST_Controller::get_items()
S
66 1 9
bp_attachments_render_medium()
S
82 1 3
bp_attachments_medium_mime_type()
S
81 1 3
bp_attachments_stop_overriding_template_stack()
S
80 1 3
bp_attachments_get_private_uploads_dir()
S
81 1 3
bp_attachments_medium_owner_mentionname()
S
81 1 3
bp_attachments_can_do_private_uploads()
S
81 1 3
bp_attachments_before_edit_avatar_content()
S
82 1 3
bp_attachments_medium_type()
S
82 1 3
bp_attachments_medium_size()
S
81 1 3
bp_attachments_print_media_library_templates()
S
83 1 3
bp_attachments_tracking_get_table()
S
79 1 3
BP_Attachments_OEmbed_Extension::content_buffer_end()
S
74 1 5
BP_Attachments_OEmbed_Extension::set_iframe_title()
S
79 1 3
bp_attachments_messages_print_js_templates()
S
82 1 3
bp_attachments_activity_print_js_templates()
S
82 1 3
bp_attachments_personal_screen()
S
77 1 4
BP_Attachments_Media::get_parent_dir_object()
S
67 1 7
bp_attachments_start_overriding_template_stack()
S
80 1 3
BP_Attachments_OEmbed_Extension::content()
S
74 1 5
bp_attachments_after_edit_avatar_content()
S
82 1 3
bp_attachments_admin_media()
S
72 1 6
bp_attachments_get_item_object_slugs()
S
68 1 8
BP_Attachments_Profile_Image_REST_Controller::get_collection_params()
S
72 1 5
bp_attachments_get_medium_fallback_text()
S
66 1 10
bp_attachments_medium_download_url()
S
81 1 3
bp_attachments_medium_can_view()
S
75 1 4
bp_attachments_get_template_stack()
S
79 1 3
bp_attachments_get_templates_url()
S
82 1 3
bp_attachments_enqueue_admin_common_assets()
S
71 1 8
bp_attachments_medium_owner_displayname()
S
81 1 3
BP_Attachments_REST_Controller::prepare_links()
S
65 1 9
BP_Attachments_Tracking_REST_Controller::get_items_permissions_check()
S
75 1 4
BP_Attachments_Profile_Image_REST_Controller::__construct()
S
74 1 4
BP_Attachments::__construct()
S
75 1 4
BP_Attachments_Filter_Iterator::accept()
S
75 1 4
bp_attachments_medium_view_url()
S
81 1 3
bp_attachments_get_version()
S
82 1 3
bp_attachments_user_raise_files_size()
S
72 1 5
BP_Attachments_Media::set_upload_dir()
S
98 1 1