Display Author name PHP (Selfmade Plug-IN)

Your $my_post array contains 'post_author' => $user_ID, but $user_ID isn’t defined.

According to WP codex, get_currentuserinfo is deprecated, and should be replaced with wp_get_current_user. But in this case you want the ID, so a better option would be get_current_user_id

So if you replace this line:

get_currentuserinfo();

With:

$user_ID = get_current_user_id();

You should be in business.