shortcode_atts()
returns an array (which is assigned to $atts
in your code).
It does not create new variables like extract()
would – by the way using extract()
is usually not recommended.
So in your code, $custom_field
(line 11) is not defined.
The value you are looking for is in $atts['custom_field']
instead.
Changing line 11 to return bg_calculate_points( $atts['custom_field'] );
will fix it.