73% add-expires-headers

Code Review | Add Expires Headers & Optimized Minify

WordPress plugin Add Expires Headers & Optimized Minify scored 73% from 54 tests.

About plugin

  • Plugin page: add-expires-headers
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9
  • WordPress version: 5.9.2
  • First release: Jul 3, 2019
  • Latest release: Mar 3, 2022
  • Number of updates: 45
  • Update frequency: every 21.7 days
  • Top authors: passionatebrains (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

8,000+ active / 123,760 total downloads


Plugin footprint 65% 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: ▲4.86MB] [CPU: ▼272.23ms] Passed 4 tests

Server-side resources used by Add Expires Headers & Optimized Minify
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.64 ▲5.1376.34 ▲23.83
Dashboard /wp-admin8.66 ▲5.2558.37 ▲26.98
Posts /wp-admin/edit.php8.66 ▲5.0263.37 ▲26.76
Add New Post /wp-admin/post-new.php11.01 ▲4.04116.56 ▼1,163.25
Media Library /wp-admin/upload.php8.66 ▲5.3647.41 ▲23.75
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.6645.38

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 218 new files
Database: no new tables, 4 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Add Expires Headers & Optimized Minify
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,852 ▲9415.15 ▼0.636.29 ▼0.143.06 ▲0.60
Dashboard /wp-admin2,959 ▲1086.18 ▼0.10120.09 ▼15.62201.14 ▲35.29
Posts /wp-admin/edit.php2,735 ▲783.12 ▼0.1264.95 ▲0.87158.41 ▲11.90
Add New Post /wp-admin/post-new.php1,674 ▲1322.29 ▲5.17414.58 ▼25.72164.86 ▲10.45
Media Library /wp-admin/upload.php1,755 ▲575.49 ▼0.00128.66 ▼22.08224.51 ▲35.79
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,4842.5152.17115.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/add-expires-headers/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 5 options in the database
    • fs_accounts
    • aeh-last-cache-update
    • fs_active_plugins
    • fs_debug_mode
    • fs_gdpr

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\AEH\\Exceptions\\BasicException' not found in wp-content/plugins/add-expires-headers/libs/matthiasmullie/minify/src/Exceptions/FileImportException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\AEH\\Minify' not found in wp-content/plugins/add-expires-headers/libs/matthiasmullie/minify/src/CSS.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\AEH\\ConverterInterface' not found in wp-content/plugins/add-expires-headers/libs/matthiasmullie/path-converter/src/NoConverter.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\AEH\\Minify' not found in wp-content/plugins/add-expires-headers/libs/matthiasmullie/minify/src/JS.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\AEH\\Exception' not found in wp-content/plugins/add-expires-headers/libs/matthiasmullie/minify/src/Exceptions/BasicException.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\AEH\\Exceptions\\BasicException' not found in wp-content/plugins/add-expires-headers/libs/matthiasmullie/minify/src/Exceptions/IOException.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\AEH\\ConverterInterface' not found in wp-content/plugins/add-expires-headers/libs/matthiasmullie/path-converter/src/Converter.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found


Plugin configuration 93% 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 require attention:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
The official readme.txt might help

add-expires-headers/add-expires-headers.php 92% from 13 tests

"Add Expires Headers & Optimized Minify" version 2.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 198 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected33,942 lines of code in 152 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity71.87
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
▷ Abstract classes69.68%
▷ Concrete classes5690.32%
▷ Final classes00.00%
▷ Static methods17713.90%
▷ Public methods88069.13%
▷ Protected methods604.71%
▷ Private methods33326.16%
▷ Named functions9487.85%
▷ Anonymous functions1312.15%
▷ Global constants10580.15%
▷ Class constants2619.85%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/AddExpiresHeaders.png6.39KB3.12KB▼ 51.25%
assests/images/AddExpiresHeaders.png6.11KB2.86KB▼ 53.27%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assests/images/AddExpiresHeadersFevicon.png2.90KB0.79KB▼ 72.70%
assests/images/5-stars.png3.63KB2.25KB▼ 37.92%