App to use Mobile phone (samsung S4 mini) as bicycle computer
This is possible.

Firstly, it depends on your idea of "old"   For some users thats any phone over five minutes is old, and for others old means a flip phone from the 90s.

Assuming you have an android-based or ios-based phone that works and has a decent battery life then you're pretty much set.  Both will run the Strava application, which looks something like this:



As @dancek says, the home screen is not configurable, so you will only see average speed for the whole ride, and instant heart rate/cadence rate if you have the sensors.   Time and Distance are counters



This is the screen that shows up when you stop.  The map with track at the top can be displayed full-screen while riding, and if you have planned a route the track is overlaid on the map as well.

Later analysis can be done on the info - here's the link for that ride:
https://www.strava.com/activities/681005599/analysis
Note I had a HRM but no cadence sensor.



This is the RUN view if you're into that kinda sport.

If you have an applewatch there's a thing for that, but I have no experience of this.   It looks like this:





Both of those screenshots show heartrate.   A phone can't do that alone - you need a heartrate sensor.  Phones with ANT+ radios are better than bluetooth sensors because the batteries last for 4-6 months, whereas bluetooth sensors are a much shorter runtime.   Also note, that phones with a "pulse meter" are useless for this purpose.





There are ant+ cadence sensors too - often a little box that straps onto a chainstay, and a small magnet on the end of a crankarm that passes near the sensor.



If you want to see your phone while riding that gets messier.  Personally I keep my phone in my pocket with the screen off.

Otherwise you'll need a handlebar mount, or a top tube bag, or both.  Its a good idea to bring a USB battery pack and cable for your phone, because a phone that runs for a day of normal use might only get 2-4 hours of riding time before its flat.

Right-angle USB cables can help organise things too.



Windows phones are lacking in this area - a good answer is Windows Phone as a Bike Computer - What is the current State of the Art?