Hey there,
with regard to the brakes , it will just be a process of elimination, especially if the bikes second hand , not knowing the type of pads of bike history.
I would start with changing the fliud, make sure its the recommended fliud, make sure it is bled properly and you get good clamping feel.
Check out the wear on the disk , if it is uneven ,grooved or badly worn, this can effect the braking ability to , there will be minimun thickness requirement/specs in the manual.
Check the brand of pads you run, I think there are a couple of make ups of pads, sintured and nonsintered and so forth.
Some pads feel different to each other , some are a hard type of pad that provide ok braking, however will wear the disk quicker , but pads will last longer.(Especially on long races in lots a mud , you dont want to run out of brake pads)
Other pads are softer compound that have better braking , but will wear the pads quicker but will give a longer disk life.
I personally go for the organic or non sintured pads, better feel for me, for my type of riding and terrain, and dont wear the disk as much.
Setup of the rod and brake lever position will come down to personal taste.
Some set it up so there is very little play in it , so when you just touch the lever with your foot , not much movement is required to get the brake to start to acuate.
Other riders like to have plenty of play in it , especially with stiff boots and rough terrain , moving body around a lot, so if your boot touches the lever by mistake , it does not acuate braking straight away or risk stalling the bike.
The style of boot,rider and riding style plays a big part. There is a lever positioning screw adjuster there also . This will allow you to adjust the horizontal position of the lever , up or down, again all personal choice.
I keep mine pretty much in the standard position, it works well for me, as I only touch the rear brake breify to position the rear end for a corner most times. Others will set it up differently. I have about 7 mm free play on the end of my lever, I have never adjusted it
The main thing you need to be aware of when adjusting the brakes, is that you have a little bit of free play so the pads are not engaging on the disk without touching the lever, and the rear wheel spins freely.
If there is no freeplay at all , the pads will be slighly in contact with the disk , when riding this can cause the disk to heat up , along with the rear caliper, can create hot spots on disk, (goes a bit blue) and proberly fry the fliud, resulting in loss of brakes.
I would have a look on U Tube and type in" rear brake setup and freeplay" and you should find plenty of stuff i would say.
Good luck with it