78% http2-push-content

Code Review | HTTP/2 Push, Async JavaScript, Defer Render Blocking CSS, HTTP2 server push, HTTP3 push

WordPress plugin HTTP/2 Push, Async JavaScript, Defer Render Blocking CSS, HTTP2 server push, HTTP3 push scored78%from 54 tests.

About plugin

  • Plugin page: http2-push-content
  • Plugin version: 1.9.72
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.0
  • WordPress version: 6.3.1
  • First release: Dec 30, 2018
  • Latest release: Nov 8, 2023
  • Number of updates: 117
  • Update frequency: every 15.2 days
  • Top authors: rajeshsingh520 (100%)

Code review

54 tests

User reviews

57 reviews

Install metrics

10,000+ active /238,459 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.32MB] [CPU: ▼0.55ms] Passed 4 tests

A check of server-side resources used by HTTP/2 Push, Async JavaScript, Defer Render Blocking CSS, HTTP2 server push, HTTP3 push
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4044.35 ▲3.78
Dashboard /wp-admin3.65 ▲0.3554.65 ▲3.79
Posts /wp-admin/edit.php3.71 ▲0.3453.52 ▲3.98
Add New Post /wp-admin/post-new.php6.19 ▲0.3088.10 ▼11.51
Media Library /wp-admin/upload.php3.52 ▲0.2838.38 ▲1.75

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
pi_review_activation_date_http2-push-content
widget_recent-posts

Browser metrics Passed 4 tests

HTTP/2 Push, Async JavaScript, Defer Render Blocking CSS, HTTP2 server push, HTTP3 push: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5714.28 ▼0.432.04 ▲0.2344.43 ▲0.45
Dashboard /wp-admin2,216 ▲395.68 ▲0.0998.16 ▲6.5844.86 ▲3.16
Posts /wp-admin/edit.php2,121 ▲212.07 ▲0.0738.54 ▲1.8434.19 ▼0.95
Add New Post /wp-admin/post-new.php1,542 ▲823.32 ▼1.62668.16 ▲48.7154.93 ▼23.20
Media Library /wp-admin/upload.php1,421 ▲274.22 ▲0.0198.38 ▼3.9542.54 ▲2.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • pi_review_activation_date_http2-push-content
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/http2-push-content/admin/partials/http2-push-content-admin-display.php
    • > /wp-content/plugins/http2-push-content/includes/pisol.class.form.php
    • > /wp-content/plugins/http2-push-content/public/partials/http2-push-content-public-display.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/http2-push-content/admin/class-http2-push-content-general-option.php:133
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/http2-push-content/includes/banner-sample.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/http2-push-content/admin/class-http2-push-content-style-option.php:117
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/http2-push-content/admin/class-http2-push-content-js-option.php:121
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/http2-push-content/admin/plugins.php:92

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("piwebsolution.com")
  • Screenshots: These screenshots lack descriptions #1, #2, #3 in http2-push-content/assets to your readme.txt
The official readme.txt is a good inspiration

http2-push-content/http2-push-content.php Passed 13 tests

"HTTP/2 Push, Async JavaScript, Defer Render Blocking CSS, HTTP2 server push, HTTP3 push" version 1.9.72's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
124 characters long description:
Push all CSS and JS file throuhg http2 server, plugin add extra files that you want to push like images font files and other

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,493 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP224376531,545
SVG211717
CSS22910134
JavaScript2129297

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity13.44
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods108
▷ Static methods21.85%
▷ Public methods10395.37%
▷ Protected methods00.00%
▷ Private methods54.63%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/background.png74.27KB26.29KB▼ 64.60%
admin/img/pi-web-solution.png21.25KB9.42KB▼ 55.67%