No, these tests shouldn't be taken seriously.
The scientific term 'mental age' has a different meaning than the one implied by those tests. In its scientific sense, it's a historic concept dating back to the early days of IQ testing. It was defined by Binet, the inventor of the IQ test, as a means to compare the intelligence of children. The mental age corresponded to the age group which had, on average, the same test value as the child that was assessed.
Historically, the ratio of mental and chronological age formed the basis of the IQ score. However, today, the IQ scores is determined by assessing the norm of test results within age groups (see this earlier answer) and the concept of 'mental age' has lost its relevance. In addition, the definition makes clear that comparing the 'mental age' of adults does not make much sense, because at some point, the test scores are not so much related to chronological age anymore.
The online 'mental age tests' do not try to measure IQ (for the validity of online IQ tests see this earlier question). Instead they ask trivia and attitude questions that are supposed to reflect your age more in a cultural sense.
None of the ones I looked at reported any scientific backing. However several noted they were for entertainment, only.