Shortcode with PHP issue “Undefined index”

It’s because if the user enters large="true", then $atts['small'] isn’t defined. The normal solution is to use shortcode_atts() to set default values for the parameters, but you’re not putting the result of shortcode_atts() into $atts, you’re just just extracting it. This means that $small will be defined, but $atts['small'] won’t be.

The proper way to solve this is to put shortcode_atts() into a variable:

$atts = shortcode_atts( array(
        'large' => false,
        'small' => false,
        'url' => ''
), $atts );

On a side note, it having a single size="" attribute, with small or large as possible values, instead of separate attributes for each size, would probably be easier to manage.