When a user creates an post and it is deleted by a moderator, the number remains in his profile.
This number is historic and trying to keep it always accurate would require a lot of extra development for little gain.
Content lists on user profiles will eventually be moved to cursor-based pagination (if they aren't already) which desn't count items either.
"Simple post counter" becomes costful as your forum grows, especially on profiles of top users who have thousands of posts. This is because user's posts
COUNT(*) is greedy, it tries to find as much data as possible, and to be accurate you would need to exclude user's posts invisible to person viewing the profile. So in practice, on forum with more than few thousand posts, COUNT would have to do multiple IO operations on indexes to find out the number of posts. This CPU and disk time would better be spent handling posts and threads queries.
Also, Misago uses PostgreSQL, not MySQL ;)
@rafalp Sorry to worry about this, but a real counter would be needed. He said it was a small profit.
Transparency and credibility, as well as Motivation and recognition.
Profiles with real counters can be more transparent and authentic to users. Due to the hiding of deleted or moderated content, it becomes more difficult to judge the true activity and contribution of profiles. People are usually motivated to create content when they can see how many posts have been shared on a social platform. The real counter recognizes the efforts of users and their commitment to the community.
I understand that it results in high CPU and disk time and you are right. But if someone wants to gain recognition with this and has to intervene with moderation, then the many "stupidities" he has written so far with this and even falsifying the statistics will remain.
I'm not asking for an entire table to be updated every time a post is created. I thought of a button on the administrator tab for synchronization (Or even checked only for selected users.), which checks the table and synchronizes the statistics, even warning that this involves high performance usage.
No. I first want to establish what's the industry standard here.
Invision Community: doesn't recount user posts when their posts are deleted. There's also no UI to see accurate number of posts for user on their profile. And the post counter is not associated with list of their posts - maybe thats how they are avoiding people spotting that counter is inaccurate when posts counter says they have 3 posts, but their posts and threads tabs are empty?
phpBB3: don't see post counter update in their moderation actions code.