84% http2-server-push

Code Review | HTTP/2 Server Push

WordPress plugin HTTP/2 Server Push scored84%from 54 tests.

About plugin

  • Plugin page: http2-server-push
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Jul 22, 2015
  • Latest release: Mar 25, 2018
  • Number of updates: 15
  • Update frequency: every 65.1 days
  • Top authors: csixty4 (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /26,082 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼12.70ms] Passed 4 tests

Analyzing server-side resources used by HTTP/2 Server Push
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0431.48 ▼8.90
Dashboard /wp-admin3.38 ▲0.0447.59 ▼13.92
Posts /wp-admin/edit.php3.42 ▲0.0647.86 ▲4.54
Add New Post /wp-admin/post-new.php6.06 ▲0.1770.07 ▼21.74
Media Library /wp-admin/upload.php3.32 ▲0.0931.10 ▼6.24

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by HTTP/2 Server Push
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.27 ▼1.161.94 ▲0.2438.80 ▼5.29
Dashboard /wp-admin2,209 ▲215.90 ▲0.01109.96 ▼8.5641.15 ▼4.64
Posts /wp-admin/edit.php2,092 ▼02.01 ▼0.0039.46 ▲0.5835.82 ▼2.79
Add New Post /wp-admin/post-new.php1,533 ▲1323.12 ▼0.16615.88 ▼55.4152.90 ▼0.01
Media Library /wp-admin/upload.php1,382 ▼34.18 ▼0.0597.03 ▼10.8741.30 ▼5.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/http2-server-push/http2-server-push.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === http2-server-push === )
You can take inspiration from this readme.txt

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

The main PHP script in "HTTP/2 Server Push" version 1.4 is automatically included on every request by WordPress
87 characters long description:
Enables HTTP/2 server push for local JavaScript and CSS resources enqueued in the page.

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
Good job! No executable or dangerous file extensions detected98 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1275666
Markdown112032

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin