<?php
$post_ids = get_objects_in_term( get_query_var( 'cat' ), 'category' );
if ( ! empty( $post_ids ) && ! is_wp_error( $post_ids ) ) {
$tags = get_terms( array(
'taxonomy' => 'post_tag',
'object_ids' => $post_ids,
'orderby' => 'count',
'order' => 'DESC',
'number' => 10
) );
if ( ! empty( $tags ) && ! is_wp_error( $tags ) ) {
shuffle($tags);
?>
<ul>
<?php foreach( $tags as $tag ) { ?>
<li><a href="<?php echo get_term_link( $tag, 'post_tag' ); ?>"><?php echo $tag->name; ?></a></li>
<?php } ?>
</ul>
<?php } ?>
<?php } ?>