Read Philippians 1:15-18
"What then? Only that in every way, whether in pretense or in truth, Christ is preached; and in this I rejoice, yes, and will rejoice." Philippians 1:18 NKJ
It seems that a Christian's motives are called into question a lot these days. There are bad motives to be sure, and I believe there are degrees of acceptable motives: good, better, and best.
Using church attendance as an example, a bad motive would be to be seen socially for financial gain. The best motive would be to meet with God and worship Him.
Let's consider a good motive. You're having a bad day and you don't feel like going to church. Is it being a hypocrite in a situation like that to go since your best motive is not possible? Are you going out of legalism or to impress God? I say "no" to these questions. Perhaps you are going because it would violate your conscience to stay home. Maybe you are in church just to be obedient to the call of God and associate with like-minded believers. These are good motives.
When you are doing a work for the Lord, don't let anyone stop you by questioning your motive. If you've prayed and it seems right to you, then go forward in His service. God can give you all the grace you need and work on your motive until it becomes the best motive.
Prayer: Father I thank you for your wonderful grace which covers my imperfections. Please let my motives be only to please you and bring You glory. Amen