77% hummingbird-performance

Code Review | Hummingbird – Optimize Speed, Enable Cache, Minify CSS & Defer Critical JS

WordPress plugin Hummingbird – Optimize Speed, Enable Cache, Minify CSS & Defer Critical JS scored 77% from 54 tests.

About plugin

  • Plugin page: hummingbird-perfo...
  • Plugin version: 3.3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9
  • WordPress version: 5.9.2
  • First release: Jun 9, 2017
  • Latest release: Mar 21, 2022
  • Number of updates: 89
  • Update frequency: every 19.6 days
  • Top authors: vanyukov (53.93%)jdailey (38.2%)igmoweb (5.62%)rickjc89 (3.37%)WPMUDEV (3.37%)

Code review

54 tests

User reviews

1280 reviews

Install metrics

100,000+ active / 2,626,010 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲3.07MB] [CPU: ▼287.82ms] Passed 4 tests

Analyzing server-side resources used by Hummingbird – Optimize Speed, Enable Cache, Minify CSS & Defer Critical JS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.74 ▲2.2262.04 ▲9.72
Dashboard /wp-admin6.77 ▲3.3751.69 ▲13.18
Posts /wp-admin/edit.php6.99 ▲3.3555.03 ▲15.33
Add New Post /wp-admin/post-new.php10.30 ▲3.34106.20 ▼1,189.38
Media Library /wp-admin/upload.php6.72 ▲3.4241.52 ▲15.20
Gzip Compression /wp-admin/admin.php?page=wphb-gzip6.5836.81
Hummingbird Pro /wp-admin/admin.php?page=wphb-upgrade6.5836.39
Settings /wp-admin/admin.php?page=wphb-settings6.7239.98
Performance Test /wp-admin/admin.php?page=wphb-performance6.5835.54
Advanced Tools /wp-admin/admin.php?page=wphb-advanced6.5835.41
Tutorials /wp-admin/admin.php?page=wphb-tutorials6.5833.70
Caching /wp-admin/admin.php?page=wphb-caching6.6441.72
Uptime /wp-admin/admin.php?page=wphb-uptime6.5835.52
/wp-admin/admin.php?page=wphb-setup6.88170.82
Dashboard /wp-admin/admin.php?page=wphb7.16109.59

Server storage [IO: ▲15.35MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • You have illegally modified 1 file (0.00KB) outside of "wp-content/plugins/hummingbird-performance/" and "wp-content/uploads/"
    • (new file) wp-content/wphb-logs/.empty
Filesystem: 879 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hummingbird – Optimize Speed, Enable Cache, Minify CSS & Defer Critical JS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,100 ▲35616.80 ▲1.149.17 ▲3.252.88 ▲0.68
Dashboard /wp-admin3,083 ▲2256.30 ▼0.01116.44 ▼12.25186.35 ▲29.11
Posts /wp-admin/edit.php2,795 ▲1043.39 ▲0.0466.32 ▲3.50137.92 ▼1.71
Add New Post /wp-admin/post-new.php1,715 ▲2515.75 ▼5.13400.30 ▼3.09172.29 ▲16.63
Media Library /wp-admin/upload.php1,806 ▲1055.54 ▲0.07136.44 ▼5.77187.37 ▼1.23
Gzip Compression /wp-admin/admin.php?page=wphb-gzip1,1205.28107.07135.17
Hummingbird Pro /wp-admin/admin.php?page=wphb-upgrade1,1205.3196.09110.36
Settings /wp-admin/admin.php?page=wphb-settings1,1205.2893.39108.56
Performance Test /wp-admin/admin.php?page=wphb-performance1,1205.0689.31108.28
Advanced Tools /wp-admin/admin.php?page=wphb-advanced1,1205.0288.06106.16
Tutorials /wp-admin/admin.php?page=wphb-tutorials1,1205.0486.71108.93
Caching /wp-admin/admin.php?page=wphb-caching1,1205.2987.42105.69
Uptime /wp-admin/admin.php?page=wphb-uptime1,1205.0290.75110.70
/wp-admin/admin.php?page=wphb-setup1,1205.0588.95108.13
Dashboard /wp-admin/admin.php?page=wphb1,1205.2886.67105.42

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • wphb_settings

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 16× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/hummingbird-performance/vendor/predis/predis/examples/dispatcher_loop.php
    • > /wp-content/plugins/hummingbird-performance/vendor/predis/predis/examples/replication_simple.php
    • > /wp-content/plugins/hummingbird-performance/vendor/predis/predis/examples/monitor_consumer.php
    • > /wp-content/plugins/hummingbird-performance/vendor/predis/predis/examples/key_prefixing.php
    • > /wp-content/plugins/hummingbird-performance/vendor/predis/predis/examples/replication_complex.php
    • > /wp-content/plugins/hummingbird-performance/vendor/predis/predis/examples/lua_scripting_abstraction.php
    • > /wp-content/plugins/hummingbird-performance/vendor/predis/predis/examples/executing_redis_commands.php
    • > /wp-content/plugins/hummingbird-performance/vendor/predis/predis/examples/redis_collections_iterators.php
    • > /wp-content/plugins/hummingbird-performance/vendor/predis/predis/examples/debuggable_connection.php
    • > /wp-content/plugins/hummingbird-performance/vendor/predis/predis/examples/pubsub_consumer.php
  • 251× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/hummingbird-performance/vendor/predis/predis/src/Command/TransactionMulti.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/hummingbird-performance/vendor/predis/predis/src/Command/ListPopFirst.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Response\\Iterator\\MultiBulkIterator' not found in wp-content/plugins/hummingbird-performance/vendor/predis/predis/src/Response/Iterator/MultiBulk.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Predis\\Connection\\ConnectionInterface' not found in wp-content/plugins/hummingbird-performance/vendor/predis/predis/src/Connection/AggregateConnectionInterface.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Predis\\Configuration\\OptionInterface' not found in wp-content/plugins/hummingbird-performance/vendor/predis/predis/src/Configuration/ProfileOption.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/hummingbird-performance/vendor/predis/predis/src/Command/ServerSlowlog.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\PredisException' not found in wp-content/plugins/hummingbird-performance/vendor/predis/predis/src/NotSupportedException.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Predis\\Connection\odeConnectionInterface' not found in wp-content/plugins/hummingbird-performance/vendor/predis/predis/src/Connection/CompositeConnectionInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/hummingbird-performance/vendor/predis/predis/src/Command/SetIsMember.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\CommunicationException' not found in wp-content/plugins/hummingbird-performance/vendor/predis/predis/src/Connection/ConnectionException.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can look at the official readme.txt

hummingbird-performance/wp-hummingbird.php 77% from 13 tests

"Hummingbird – Optimize Speed, Enable Cache, Minify CSS & Defer Critical JS" version 3.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("hummingbird-performance.php" instead of "wp-hummingbird.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 199 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin55,739 lines of code in 692 files:
LanguageFilesBlank linesComment linesLines of code
PHP5389,32721,67240,474
JSX425801,2754,627
JavaScript437451,3084,318
Sass31656303,702
Markdown754201,498
SVG1501463
CSS92413408
JSON200114
diff4868111
INI16624

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity12.33
▷ Minimum class complexity1.00
▷ Maximum class complexity296.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces38
Interfaces25
Traits3
Classes334
▷ Abstract classes175.09%
▷ Concrete classes31794.91%
▷ Final classes10.32%
Methods1,988
▷ Static methods1889.46%
▷ Public methods1,57179.02%
▷ Protected methods24312.22%
▷ Private methods1748.75%
Functions65
▷ Named functions1726.15%
▷ Anonymous functions4873.85%
Constants50
▷ Global constants2142.00%
▷ Class constants2958.00%
▷ Public constants29100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
130 PNG files occupy 2.12MB with 1.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/image/summary-graphic-uptime@2x.png33.73KB11.42KB▼ 66.16%
admin/assets/image/tour/tour-grey-compress@2x.png7.99KB3.46KB▼ 56.70%
admin/assets/image/hb-graphic-reports-disabled@2x.png25.95KB8.62KB▼ 66.79%
admin/assets/image/hero@2x.png115.29KB28.73KB▼ 75.08%
_src/images/summary-graphic-dash.png16.08KB5.82KB▼ 63.78%