To find out how much luck is hard , but it can be done like this.
Give him some bb gun , place him 1 hex away from another character and order him to shoot as much so he does like at least 100 eye shots. When you have done that you must save log and then sort out all eye shots from that log file what your companion has done , after that you do simple math to determine how much of eyes shots were critical hits , if you end with something like 56.73% you round down and if 55.46% round up and then it's seems like he has 6 luck

( each point of luck gives 3% to critical chance it will be 53% or 56% only between 5 and 6 luck if you get some 54.43% it means the test was incorrect and need to do more eye shots) , use fonline character planner to check how much critical chance you have with certain amount of luck.
I'm not sure if companions gain perks , if they do that must be done on level 2 otherwise they might have some more critical perk and it all will be incorrect.
There is a way how to determine int but ... fuck i will not go into that it's some hardcore stuff

... huh maybe not so hardcore but i'm lazy.
Or maybe there isn't a way , depends on how companions distribute their skillpoints when reaching level , i'm guessing they don't dump all their skillpoints in weapon skills at any level. If they would do that , then you would just have to compare their range capabilities with their appropriate weapon skill with a certain weapon on different levels. Then you would have to determine their performance changes with that weapon ( like companion gained 6 levels and now he shoots 8 hexes further with lsw) , then you need full knowledge of hit to chance formulas and determine how much skillpoints the companion have accumulated into the weapon skill in order to allow him to shoot those 8 hexes further , only then you might have some idea how much int he has and even then not precisely.
Devs should just make their stats available as some information on some pip boy or whatever
