I've been to ibiza from Barcelona and also via Denia, Denia is the shortest and easiest route (ferry wise) depending on how you want to do it, But longer to ride to, and a very quaint port.
If i was going to advise you I'd say overnight from Barcelona and return via Denia. but be warned arriving into Barcelona the motorway off roads are numerous and very easy to take the wrong one.
You will need to follow your GPS very closely to get to the port. That said everything else was easy.
On return depending on your route back, i rode up via Zaragoza which is beautiful. If you do this, stay in the Ibis Zaragoza central it has off street parking and a lovely pictureque walk over the bridge into the city.
The ferry usually gets into Denia at 4pm so the ride up to Zaragoza is about 4 hours. but worth the effort.
Valencia is an alternative. What i would say is if you book Barcelona or Valencia as a return booking, expect to sit on the ferry for 12 hours on the return sailing. wheras Denia is 3 hours.
Balearia ferries
https://www.balearia.com/en
Edit: Where are you staying in Ibiza?