It's been a tough year for brick-and-mortar retailers trying to take on the growing popularity of e-commerce. In the fourth quarter last year, e-commerce accounted for 9.5% of all retail sales in the U.S., according to the census bureau. (NASDAQ:AMZN) has been a huge beneficiary of the trend.

Meanwhile, brick-and-mortar retailers like Wal-Mart (NYSE:WMT) are working to catch up to Amazon. One big exception, however, is Costco (NASDAQ:COST), which would rather see customers come into its warehouse clubs. While that worked for a little while, Costco has started falling short of revenue and earnings expectations recently. In the fourth quarter, Costco fell short of analyst expectations for same-store sales growth and profit.

Costco's membership model is often seen as well protected from Amazon, but that doesn't seem to be the case any longer.

The exterior of a Costco store.

Image source: Costco.

Costco isn't really fighting back on e-commerce

About a year ago, Costco CFO Richard Galanti said the only thing keeping him up at night is "everybody in the world never wanting to leave their house and only typing stuff to order and get it at the front door." While Costco has made some improvements to its online shopping platform, it's still holding back certain product features, like ordering online and picking up in the store. Galanti says it doesn't have room in its stores for in-store pickup anyway -- although Wal-Mart's Sam's Club was able to make it work.

Costco doesn't think it's losing in e-commerce. It's currently attacking the "low-hanging fruit," as Galanti put it. And that strategy is working. Online sales increased 11% to 12% last quarter. However, online sales totaled just $4.5 billion for the quarter -- 4% of total revenue.

Is a membership increase coming at the exact wrong time?

Membership fees generate the vast majority of Costco's profits as it sells its actual merchandise at razor-thin margins. But in the last few quarters, membership revenue growth has decelerated to around 5.5% from around 7%.

Costco hopes to reaccelerate membership revenue growth by increasing its membership fees by 9% -- from $55 to $60 for its most popular rate. It's the company's first rate increase in five years. But as more shoppers are able to get what they need online, an increase in membership fees runs the risk of reducing gross membership additions and lowering renewal rates.

Sam's Club memberships can be had for less than Costco ($45). Additionally, just introduced free two-day shipping on two million items available online -- no membership required. Amazon Prime membership costs just $99 for unlimited two-day shipping, and includes video and music streaming among other bonus features.

Importantly, Amazon Prime continues to prove its worth. Its video-streaming catalog is on par with premium cable networks, and its original series and films won multiple awards this past year. Its collection of Amazon-branded exclusives is expanding, as well, taking on Costco's Kirkland brand.

For consumers facing a decision between Amazon Prime and a Costco membership, Prime continues to look more attractive. Meanwhile, the price hike at Costco makes it look slightly less attractive.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.