# magefan/module-rocketjavascript

> Move all javascript to the footer on Magento 2 store.

`composer require magefan/module-rocketjavascript`

Canonical URL: https://packagento.com/magefan/module-rocketjavascript

## At a glance

- **Vendor**: magefan (https://packagento.com/magefan.md)
- **Latest version**: 2.2.3 — released 2026-03-23
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/magefan/module-rocketjavascript and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require magefan/module-rocketjavascript:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Move all javascript to the footer on Magento 2 store.

## README

[![Total Downloads](https://poser.pugx.org/magefan/module-rocketjavascript/downloads)](https://packagist.org/packages/magefan/module-rocketjavascript)
[![Latest Stable Version](https://poser.pugx.org/magefan/module-rocketjavascript/v/stable)](https://packagist.org/packages/magefan/module-rocketjavascript)


<a href="https://savelife.in.ua/en/donate-en/#donate-army-card-monthly"><img width="830" height="208" src="https://cm.magefan.com/blog/support-ukraine.png"></a>

<img width="150" height="100" src="https://magefan.com/media/wysiwyg/made_in_ukraine.jpg">

### Magento2 Footer JavaScript
### Magento2 Deferred JavaScript
### Magento2 Optimized Bundle JavaScript


<a href="https://magefan.com/rocket-javascript-deferred-javascript"><img width="190" height="70" src="https://cm.magefan.com/wysiwyg/products/download-magefan-extensions.png"></a>
  
### Configuration
  * To enable or disable extension please navigate to Magento 2 Admin Panel > Stores > Magefan Extensions > Rocket JavaScript

### Requirements
  * Magento Community Edition 2.1.x-2.4.x or Magento Enterprise Edition 2.1.x-2.4.x
  
### Installation
* [Install Rocket JavaScript Extension for Magento 2 via Composer or an archive](https://magefan.com/blog/rocket-javascript-installation)

### Get List Of Used JS On A Single Page
```
/* Use in browser console */
globalSrc = '';
jQuery('script').each(function(){
if (!jQuery(this).attr('src')) return;
var src = jQuery(this).attr('src');
if (src.indexOf(require.toUrl('')) != -1 && src.indexOf('Magefan_LazyLoad') == -1) {
var src = (src.replace(require.toUrl(''), ''));
globalSrc += "\n" + src;
}
})
console.log(globalSrc);

```
### Demo

Try out our open demo and if you like our extension **please give us some star on Github ★**
<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
        Storefront Demo
      </td>
      <td align="center" valign="middle">
        Admin Panel Demo
      </td align="center" valign="middle">
    </tr>
    <tr>
      <td align="center" valign="middle">
        <a href="https://opt.demo.magefan.top/">
          <img
            src="https://magefan.com/static/version1520969775/frontend/Magefan/new/en_US/images/product-tab-demo-1.jpg"
            alt="Magneto 2 Rocket JavaScript Extension Storefront Demo"
            height="220"
          >
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://opt.demo.magefan.top/admin/admin/">
          <img
            src="https://cs.magefan.com/version1732118579/frontend/Magefan/next/en_US/Magefan_CssOptimizer/images/product-tab-demo-2.jpg"
            alt="Magento 2 Rocket JavaScript Extension Admin Panel Demo"
            height="220"
          >
        </a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
        <a href="https://opt.demo.magefan.top/">
          view
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://opt.demo.magefan.top/admin/admin/">
          view
        </a>
      </td>
    </tr>
  </tbody>
</table>

### Support
If you have any issues, please [contact us](mailto:support@magefan.com)
then if you still need help, open a bug report in GitHub's
[issue tracker](https://github.com/magefan/module-rocketjavascript/issues).

Please do not use Magento Marketplace's Reviews or (especially) the Q&A for support.
There isn't a way for us to reply to reviews and the Q&A moderation is very slow.

### License
The code is licensed under [Open Software License ("OSL") v. 3.0](http://opensource.org/licenses/osl-3.0.php).

### [Magento Extensions](https://magefan.com/magento-2-extensions) by Magefan

#### Magento 2 SEO Extensions

* [Magento SEO](https://magefan.com/magento-2-seo-extension)
* [Magento 2 Rich Snippets](https://magefan.com/magento-2-rich-snippets)
* [Magento 2 HTML Sitemap](https://magefan.com/magento-2-html-sitemap-extension)
* [Magento 2 XML Sitemap](https://magefan.com/magento-2-xml-sitemap-extension)
* [Magento 2 Twitter Cards](https://magefan.com/magento-2-twitter-cards-extension)
* [Magento Open Graph Tags](https://magefan.com/magento-2-open-graph-extension-og-tags)

#### [Magento 2 Google Extensions](https://magefan.com/magento-2-extensions/google-extensions)

* [Magento Google Tag Manager](https://magefan.com/magento-2-google-tag-manager)
* [Magento 2 Google Analytics 4](https://magefan.com/magento-2-google-analytics-4)
* [Magento Google Shopping Feed](https://magefan.com/magento-2-google-shopping-feed-extension)
* [Magento Google Customer Reviews](https://magefan.com/magento-2-google-customer-reviews)
* [Magento 2 Google Indexing](https://magefan.com/magento-2-google-indexing-api)

#### [Magento Speed Optimisation Extensions](https://magefan.com/magento-2-extensions/speed-optimization)

* [Magento 2 Google Page Speed Optimizer](https://magefan.com/magento-2-google-page-speed-optimizer)
* [Magento 2 WebP Images](https://magefan.com/magento-2-webp-optimized-images)
* [Magento Full Page Cache Extension](https://magefan.com/magento-2-full-page-cache-warmer)
* [Magento 2 Lazy Load Images](https://magefan.com/magento-2-image-lazy-load-extension)

#### [Magento Admin Extensions](https://magefan.com/magento-2-extensions/admin-extensions)

_(README truncated for .md surface. Full README on https://packagento.com/magefan/module-rocketjavascript.)_

## Recent Versions

| Version | Released |
|---|---|
| 2.2.3 | 2026-03-23 |
| 2.2.2 | 2025-05-08 |
| 2.2.1 | 2025-03-20 |
| 2.2.0 | 2024-11-18 |
| 2.1.9 | 2023-11-23 |
| 2.1.8 | 2023-06-09 |
| 2.1.7 | 2023-05-02 |
| 2.1.6 | 2020-08-27 |
| 2.1.5 | 2020-05-26 |
| 2.1.4 | 2020-01-13 |

Showing 10 of 15 versions. Full release history on https://packagento.com/magefan/module-rocketjavascript.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magefan/module-community | >=2.3.4 |

### Suggest

| Package | Constraint |
|---|---|
| magefan/module-lazyload | Install Lazy Load to defer offscreen images loading. |
| magefan/module-webp | Install WebP Optimized Images to serve images in the next-gen format. Use coupon code COMPOSER-FAN to get 10% discount on magefan.com. |

## Quality

Latest release (2.2.3) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 17 | 17 warnings (ruleset: Magento2) |
| PHPMD | Warning | 8 | 8 rule violations (CyclomaticComplexity:2, NPathComplexity:2, UndefinedVariable:2, UnusedFormalParameter:2) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 3 | valid; 3 advisory notes (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 50 | 50 | – | – |
| 2.4.8 | – | 59 | 59 | – |
| 2.4.9 | – | – | 59 | 59 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["magefan/module-rocketjavascript"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

magefan is a Magento 2 vendor on Packagento. See https://packagento.com/magefan.md for their full catalogue.

