While you can try the latest firmware and as close to factory settings the awful truth is that for high speeds not only must you have a compatible WiFi card but I find I have to install Gigabit dual band routers.
The speed also drops with distance so you will get clients that want full speed at all locations in the home. For them you move to mesh networking.
https://www.google.com/search?q=D-Link+DIR-645+slow+wifi shows this is not an uncommon complaint for this model so after you try new firmware and settings, exchange it fast.
I have a D-Link DIR-645 wireless router, connected to a cable modem.
I get over 150 Mbps download speed if I use a wired ethernet connection (plugging either into the modem directly or into a LAN port on the DIR-645).
However, if I connect to the DIR-645 via wifi, I get less than 50 Mbps, even when the computer is positioned right next to the router. According to the published specs, this router should accomplish up to 300 Mbps.
I've done speed tests done on several computers.
Why could be the reason why the wifi speed is so much slower than the cable speed? Is there a setting I can change in the router setup to speed it up?