How to Escape Custom Meta Data And Prefix Custom Meta ID

  1. esc_url() – The correct option. He will prepare a string for use in attributes. Doc: https://developer.wordpress.org/reference/functions/esc_url/

  2. Adding a prefix is correct. You will secure your variables from overriding with other plug-ins.

  3. yes