I am reading frol maggiesensei.com and I came across this sentence.
The meaning is "A person like you is called a mean person".
Why is を being used instead of は？
Is the phrase before を a direct object?
Yes, this is a transitive usage of 言う. It takes the form X(のこと)をYという, and means "to call X Y". For instance:
Young children call their feet 'tootsies'.
Note that while you've translated the Japanese sentence in the question using the passive (which makes sense, as it's the most natural phrasing in English), the original Japanese isn't a passive construction - あなたみたいな人 is the object of いう. The subject is unstated, but would probably be 人は (so more literally it would translate as "People call people like you 'mean'").
The という construction is commonly used without an explicit subject like this to indicate a term that's commonly used to refer to something by people in general. You could liken it to the old-fashioned English construction of using "one" as a generic filler subject: "One calls people like you 'mean'".