Magento 2 – How to Create a Marketplace Ready Extension

extensionsmagento2marketplace

I have created a Magento 2 extension which I wanted to upload on Magento Marketplace.

When I tried to upload my extension it got rejected multiple times with one or the other reason. Due to this and multiple submission, my extension got rejected with below message from Magento.

For policy or quality reasons, after evaluating your submission, we have decided not continue our review of MY EXTENSION

Now Magento is not allowing to update and re-submit my extension.

I have checked and found Magento is using its EQP process for checking extensions uploaded to the Marketplace.

Which things I have to take care to make a Magento 2 extension Marketplace ready?

Best Answer

Below are the few things I found which can help to reduce rejection and pass EQP process.

Module Checks:

  1. Keep Your vendor name same as Vendor Name of your Marketplace account
  2. Create your extension with developer mode enabled
  3. Must have composer.json in root folder of extension Eg. app/code/Vendor/Module/composer.json" with correct configurations and dependencies
  4. Must have registration.php in root folder of extension Eg. app/code/Vendor/Module/registration.php"

Code Checks:

  1. Do not use $_REQUEST, $_POST, $_GET, $_FILE directly

  2. Never end class file with ending php tag ?>

  3. Do not use die() or exit() in your code.

  4. Do not use // @codingStandardsIgnoreLine or // @codingStandardsIgnoreFile in code

  5. Remove unnecessary code and comments

  6. Use spaces for indentation

  7. Check for code duplication Refer Use ClassPreferences and/or Magento 2's plugin structure to avoid duplicating code.

  8. Add PHP DockBlock for your classes

  9. Use proper DockBlock for each of your functions with parameters and return types.

  10. It is better to use Service Contract approach for your module development.

Testing and Debugging:

  1. Check extension functionality with Magento compilation php bin/magento setup:di:compile
  2. Check compatibility with production mode enabled
  3. Test with cache enabled and disabled
  4. Validate your package e.g. php validate_m2_package.php my-theme.zip my-module.zip
  5. Check coding standard with phpcs E.g. $ vendor/bin/phpcs /path/to/your/extension --standard=MEQP2 --severity=10
  6. Do Complete Testing of your code. Execute command bin/magento dev:tests:run More Reference

Content and Description Checks:

  1. Do not use Magento logo in your documents or images
  2. Do not use "Product Box Image" as extension main image
  3. Add proper description for your extension functionality
  4. Correct grammatical errors (punctuation, capitalization, word usage, etc). Remember to use "a","an", and "the" correctly. Make sure words are plural when necessary. Be sure words that should be past tense are past tense.
  5. Check and confirm you do not have any broken link in your document or description content.
  6. Do not add links of other extensions/services in description content. Promoting services or other created extensions in Magento Marketplace or Magento Connect is prohibited.

Other:

  1. Submit an e-copy of your Tax Forms to marketplace@magento.com (Required only if you are selling paid extensions)

Keeping the practice of following above standards will surely improve extension quality.

Related Topic