Costco's (NASDAQ:COST) performance this year has been patchy with shares down 5%. The company's second-quarter numbers slightly missed consensus expectations as heavy discounting during the holiday period ate into its margins. Weak sales, deflation in gas prices, and forex fluctuations also affected its second-quarter results. Moreover, with competition rising from big box retailers such as Wal-Mart (NYSE:WMT) and competitive pricing from dollar stores such as Dollar General (NYSE:DG), is the membership warehouse retailer in for troubled times ahead?

In trouble
There are a number of factors why Costco is feeling the heat. Forex fluctuations have negatively affected its revenue from international operations. Also, bad weather conditions, which affected many retailers last quarter, also damaged Costco's performance. Its sales were hurt by club closures across the United States, Canada, and even in Japan because of snowstorms.  It also had to close its store in Mexico after a hurricane.

Another reason behind Costco's declining profits is the deep discounts it gave during the holiday season. As a result, profit fell 15%. But, as analysts at Nomura point out, "Costco's consistent low-mid-single-digit traffic gains over the last year in spite of the challenging retail environment were particularly encouraging. We continue to believe the fundamentals of the company are intact."

Some positives
Costco has some reasons to cheer as new memberships increased 13% in the second quarter, following the opening of new stores in Japan and Australia. Costco's executive membership base has also been rising at a good pace, and this will be profitable in the long run since executive members, which represent 38% of all members, spend more than their non executive brethren.

As far as expansion is concerned, Costco opened warehouses at 16 new locations by the end of the second quarter. Looking forward, it has plans to open an additional 14 stores before the end of this fiscal year. The expansion will be carried across the U.S., Canada, Japan, Korea, the U.K., and Australia. Costco plans to open its first store in Spain this year and end the fiscal period with 30 new openings. Given that Costco's new warehouses have fueled its growth in recent times, these new openings should enhance investors' confidence going forward.

Outperforming Sam's Club
Also, Costco has pioneered the warehouse club retail model, which relies on bargaining power, supply chain efficiencies, and smaller markups on branded products, giving it an edge over the likes of Wal-Mart. Also, Costco generated about $162 million per club in the last fiscal year, compared with $80 million per unit at Wal-Mart's Sam's Club. Costco's product assortment and services, along with a friendlier and a better store layout as compared to Sam's Club are some of the factors that make it click with customers.  

Even though Wal-Mart's Sam's Club offers various services such as free flat-tire repair, car battery testing and wiper blade installation, Costco's ancillary business has also been growing well. This segment includes various services such as food courts, photo centers, gas stations, etc., and accounts for around 20% of overall revenue. The ancillary segment's revenue has increased at a faster rate than store revenue because Costco is attracting new customers with the help of its ancillary units using its so called "loss leader strategy."  

In this strategy, a product is sold at or below cost to get customers into the shop. But, this will be beneficial only if they buy other things from its retail department, so success is not guaranteed here.

But what about this potential threat
Also, potential competition cannot be ruled out from dollar stores such as Dollar General. Although Dollar General follows a different format, and is not a warehouse club like Costco, its low pricing could turn out to be a threat. Last year, according to a Kantar Retail price survey, Dollar General's total basket was the cheapest among the retailers surveyed. With everyday low prices and a huge network of stores that exceeds 11,000, the point that Dollar General could be a threat cannot be ignored. Moreover, Dollar General opens 600-700 locations a year, signifying the rapid pace at which it is expanding its reach. 

Costco's new stores seem to be performing well, but the company needs to get its act together after a weak quarter last time. It will continue to expand internationally, but at a trailing P/E ratio of 25, I think that it is too expensive to jump in right now. So, investors should wait on the sidelines for a more attractive share price.

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.