94% rocket-footer-js

Code Review | WP Rocket Footer JS

WordPress plugin WP Rocket Footer JS scored 94% from 54 tests.

About plugin

  • Plugin page: rocket-footer-js
  • Plugin version: 3.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-5.4
  • WordPress version: 5.9.2
  • First release: Mar 27, 2016
  • Latest release: Mar 9, 2020
  • Number of updates: 403
  • Update frequency: every 3.6 days
  • Top authors: pcfreak30 (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

2,000+ active / 76,229 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.57MB] [CPU: ▼296.01ms] Passed 4 tests

Analyzing server-side resources used by WP Rocket Footer JS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6359.02 ▲7.57
Dashboard /wp-admin3.97 ▲0.5735.57 ▲1.84
Posts /wp-admin/edit.php4.20 ▲0.5641.08 ▲4.06
Add New Post /wp-admin/post-new.php7.50 ▲0.53108.24 ▼1,192.85
Media Library /wp-admin/upload.php3.92 ▲0.6328.75 ▲2.92

Server storage [IO: ▲0.49MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 184 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP Rocket Footer JS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,776 ▲5415.74 ▲0.125.72 ▼0.282.36 ▲0.15
Dashboard /wp-admin2,908 ▲476.08 ▼0.06114.71 ▼24.05155.17 ▼15.97
Posts /wp-admin/edit.php2,702 ▲83.24 ▲0.0262.72 ▼1.97137.14 ▼4.12
Add New Post /wp-admin/post-new.php1,669 ▼10415.96 ▼6.17432.36 ▼27.44151.53 ▼4.05
Media Library /wp-admin/upload.php1,711 ▲105.46 ▼0.06144.90 ▲2.88189.28 ▲1.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 119× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Rocket\\Footer\\JS\\Integration\\IntegrationAbstract' not found in wp-content/plugins/rocket-footer-js/lib/Rocket/Footer/JS/Integration/GoogleMapsWidgetPRO.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rocket\\Footer\\JS\\Integration\\IntegrationAbstract' not found in wp-content/plugins/rocket-footer-js/lib/Rocket/Footer/JS/Integration/Listify.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rocket\\Footer\\JS\\Integration\\IntegrationAbstract' not found in wp-content/plugins/rocket-footer-js/lib/Rocket/Footer/JS/Integration/QcodeThemeFramework.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rocket\\Footer\\JS\\Integration\\IntegrationAbstract' not found in wp-content/plugins/rocket-footer-js/lib/Rocket/Footer/JS/Integration/Tawkto.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rocket\\Footer\\JS\\Rewrite\\RewriteAbstract' not found in wp-content/plugins/rocket-footer-js/lib/Rocket/Footer/JS/Rewrite/PingdomPrum.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rocket\\Footer\\JS\\Integration\\IntegrationAbstract' not found in wp-content/plugins/rocket-footer-js/lib/Rocket/Footer/JS/Integration/RecaptchaInWPCommentsForm.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rocket\\Footer\\JS\\Lazyload\\LazyloadAbstract' not found in wp-content/plugins/rocket-footer-js/lib/Rocket/Footer/JS/Lazyload/AmazonAds.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rocket\\Footer\\JS\\Integration\\IntegrationAbstract' not found in wp-content/plugins/rocket-footer-js/lib/Rocket/Footer/JS/Integration/PressCoreThemeFramework.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rocket\\Footer\\JS\\Lazyload\\LazyloadAbstract' not found in wp-content/plugins/rocket-footer-js/lib/Rocket/Footer/JS/Lazyload/QcodeGoogleMaps.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Rocket\\Footer\\JS\\Rewrite\\RewriteAbstract' not found in wp-content/plugins/rocket-footer-js/lib/Rocket/Footer/JS/Rewrite/PushCrew.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === rocket-footer-js === )
Please take inspiration from this readme.txt

rocket-footer-js/rocket-footer-js.php Passed 13 tests

The main PHP script in "WP Rocket Footer JS" version 3.2.3 is automatically included on every request by WordPress
81 characters long description:
Unofficial WP-Rocket addon to force all JS both external and inline to the footer

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin8,987 lines of code in 173 files:
LanguageFilesBlank linesComment linesLines of code
PHP1471,6912,0186,765
JavaScript173914821,808
JSON700269
CSS2212145

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity8.57
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces16
Interfaces2
Traits4
Classes132
▷ Abstract classes96.82%
▷ Concrete classes12393.18%
▷ Final classes00.00%
Methods513
▷ Static methods40.78%
▷ Public methods34266.67%
▷ Protected methods14127.49%
▷ Private methods305.85%
Functions31
▷ Named functions1651.61%
▷ Anonymous functions1548.39%
Constants19
▷ Global constants1157.89%
▷ Class constants842.11%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin