73% fast-velocity-minify

Code Review | Fast Velocity Minify

WordPress plugin Fast Velocity Minify scored73%from 54 tests.

About plugin

  • Plugin page: fast-velocity-minify
  • Plugin version: 3.4.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.3
  • WordPress version: 6.3.1
  • First release: Jun 21, 2016
  • Latest release: Oct 19, 2023
  • Number of updates: 559
  • Update frequency: every 4.8 days
  • Top authors: Alignak (100%)

Code review

54 tests

User reviews

192 reviews

Install metrics

60,000+ active /3,270,520 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▲7.85ms] Passed 4 tests

Analyzing server-side resources used by Fast Velocity Minify
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.47 ▲1.0154.69 ▲11.58
Dashboard /wp-admin3.78 ▲0.4861.51 ▲11.42
Posts /wp-admin/edit.php3.87 ▲0.5164.22 ▲11.49
Add New Post /wp-admin/post-new.php6.34 ▲0.4596.96 ▼1.37
Media Library /wp-admin/upload.php3.68 ▲0.4546.28 ▲9.86
Fast Velocity Minify /wp-admin/options-general.php?page=fvm3.7945.71

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

Filesystem and database footprint
Please try to fix the following items
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/fast-velocity-minify/" and "wp-content/uploads/"
    • (new file) wp-content/cache/fvm/min/.empty
Filesystem: 53 new files
Database: 2 new tables, 7 new options
New tables
wp_fvm_cache
wp_fvm_logs
New WordPress options
fvm_plugin_meta
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Fast Velocity Minify
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲3814.72 ▼0.011.71 ▼0.1045.24 ▲4.62
Dashboard /wp-admin2,216 ▲425.50 ▼0.1588.82 ▼1.4840.71 ▼1.69
Posts /wp-admin/edit.php2,127 ▲242.05 ▲0.0338.93 ▼2.7633.81 ▼8.57
Add New Post /wp-admin/post-new.php1,548 ▲2023.36 ▲0.30648.08 ▲5.5452.47 ▼2.94
Media Library /wp-admin/upload.php1,424 ▲274.16 ▼0.01112.93 ▼1.9648.70 ▲6.28
Fast Velocity Minify /wp-admin/options-general.php?page=fvm1,6661.7731.7554.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/fast-velocity-minify/inc/common.php+677
    rmdir(wp-content/cache/fvm/min): Directory not empty
  • The uninstall procedure has failed, leaving 7 options in the database
    • fvm_plugin_meta
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'FVM\\MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/fast-velocity-minify/libs/matthiasmullie/path-converter/src/NoConverter.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'FVM\\MatthiasMullie\\Minify\\Exception' not found in wp-content/plugins/fast-velocity-minify/libs/matthiasmullie/minify/src/Exceptions/BasicException.php:22
    • > PHP Notice
      Undefined variable: active_tab in wp-content/plugins/fast-velocity-minify/layout/admin-layout-help.php on line 1
    • > PHP Notice
      Undefined variable: active_tab in wp-content/plugins/fast-velocity-minify/layout/admin-layout-status.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'FVM\\MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/fast-velocity-minify/libs/matthiasmullie/minify/src/Exceptions/FileImportException.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/fast-velocity-minify/layout/admin-layout.php:11
    • > PHP Notice
      Undefined variable: active_tab in wp-content/plugins/fast-velocity-minify/layout/admin-layout-upgrade.php on line 1
    • > PHP Notice
      Undefined variable: active_tab in wp-content/plugins/fast-velocity-minify/layout/admin-layout-settings.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'FVM\\MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/fast-velocity-minify/libs/matthiasmullie/minify/src/JS.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'FVM\\MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/fast-velocity-minify/libs/matthiasmullie/path-converter/src/Converter.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

fast-velocity-minify/fvm.php 77% from 13 tests

The main file in "Fast Velocity Minify" v. 3.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fast-velocity-minify.php" instead of "fvm.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 192 characters long)
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.2" instead of "7.3")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin6,124 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP261,8392,2586,057
CSS12348
JavaScript17516
Markdown1003

PHP code Passed 2 tests

An short overview of 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.56
Average class complexity38.08
▷ Minimum class complexity1.00
▷ Maximum class complexity250.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes12
▷ Abstract classes325.00%
▷ Concrete classes975.00%
▷ Final classes00.00%
Methods144
▷ Static methods21.39%
▷ Public methods9364.58%
▷ Protected methods5135.42%
▷ Private methods00.00%
Functions109
▷ Named functions9587.16%
▷ Anonymous functions1412.84%
Constants25
▷ Global constants2496.00%
▷ Class constants14.00%
▷ Public constants1100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-icons_555555_256x240.png6.84KB4.18KB▼ 38.84%
assets/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
assets/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%