No, the crowd in Matt 7:21-23 had all done "good works" in Jesus' name, thinking that would get them into the kingdom. And it didn't.
Let me see.
1) The words (Good Works), are not found in that verse.
2) The words (Wonderful Works ) are, but they do not mean Good Works even though we might consider them to be so.
We have to take what was written as it is, not interjecting our own Definitions, Doctrines, or Beliefs.
Therefore the Definition of the words used explain what was meant by Jesus' statement, is needed.
WONDERFUL WORKS:
G1411
δύναμις
dunamis
doo'-nam-is
From G1410; force (literally or figuratively); specifically miraculous power (usually by implication a miracle itself): - ability, abundance, meaning, might (-ily, -y, -y deed), (worker of) miracle (-s), power, strength, violence, mighty (wonderful) work.
G1410
δύναμαι
dunamai
doo'-nam-ahee
Of uncertain affinity; to be able or possible: - be able, can (do, + -not), could, may, might, be possible, be of power.
Again, nowhere in the two Definition's is (Good Works) to be found.
Now concerning the words (Good Works).
Eph. 2:10
For we are his workmanship, created in Christ Jesus unto
good works, which God hath before ordained that we should walk in them.
GOOD:
G18
ἀγαθός
agathos
ag-ath-os'
A primary word; “good” (in any sense, often as noun): - benefit, good (-s, things), well. Compare G2570.
G2570
καλός
kalos
kal-os'
Of uncertain affinity; properly beautiful, but chiefly (figuratively) good (literally or morally), that is, valuable or virtuous (for appearance or use, and thus distinguished from G18, which is properly intrinsic): - X better, fair, good (-ly), honest, meet, well, worthy.
WORKS:
G2041
ἔργον
ergon
er'-gon
From ἔργω ergō (a primary but obsolete word; to work); toil (as an effort or occupation); by implication an act: - deed, doing, labour, work.
Thus, what we find when we compare the the Definitions of the two is,
1) (Wonderful Works)
2) (Good Works)
There is ONE word in the GREEK, which defines what Jesus was saying, (Given above).
Whereas, we find in the GREEK there are two separate words, each with their own definitions concerning what is being done. (Type of Work)
Jesus in Mat. 7 was not speaking about the specific things they were doing, but HOW they were doing them.
In Eph. 2 the specific Works are being spoken of.
Mat 7:21
Not every one that saith unto me, Lord, Lord, shall enter into the kingdom of heaven;
but he that doeth the will of my Father which is in heaven.
Jesus was saying that what they were doing wasn't enough, He then pointed out what was most important.
John 9:35-37
35) Jesus heard that they had cast him out; and when he had found him, he said unto him,
Dost thou believe on the Son of God?
36) He answered and said, Who is he, Lord,
that I might believe on him?
37) And Jesus said unto him, Thou hast both seen him, and it is he that talketh with thee.
Therefore, Jesus was saying, it is not what you do, which get you into the Kingdom (WORKS) but, what you (BELIEVE).