84% fasterimage

Code Review | fasterImage Image Optimizer

WordPress plugin fasterImage Image Optimizer scored84%from 54 tests.

About plugin

  • Plugin page: fasterimage
  • Plugin version: 2.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Jul 28, 2021
  • Number of updates: 47
  • Update frequency: every 45.8 days
  • Top authors: nhodin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,503 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.08MB] [CPU: ▼3.62ms] Passed 4 tests

Analyzing server-side resources used by fasterImage Image Optimizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.07 ▼6.28
Dashboard /wp-admin4.74 ▲1.3954.01 ▼10.06
Posts /wp-admin/edit.php4.85 ▲1.5057.45 ▲7.51
Add New Post /wp-admin/post-new.php7.32 ▲1.43101.06 ▼3.82
Media Library /wp-admin/upload.php4.66 ▲1.4343.74 ▲5.70
fasterImage /wp-admin/options-general.php?page=fasterimage_settings6.2255.00

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 196 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
fasterimage_account_valid_expiration
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
fasterimage_admin_notices
fasterimage_account_valid
db_upgraded
fasterimage_enabled

Browser metrics Passed 4 tests

An overview of browser requirements for fasterImage Image Optimizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.35 ▼0.051.74 ▼0.1739.19 ▼3.74
Dashboard /wp-admin2,215 ▲355.61 ▼0.0490.42 ▼7.1443.35 ▼2.40
Posts /wp-admin/edit.php2,121 ▲212.01 ▲0.0039.15 ▲1.7538.07 ▲3.42
Add New Post /wp-admin/post-new.php1,552 ▲1718.08 ▲0.01591.79 ▼74.3976.63 ▲15.70
Media Library /wp-admin/upload.php1,417 ▲174.21 ▼0.0495.32 ▼3.1144.74 ▲0.77
fasterImage /wp-admin/options-general.php?page=fasterimage_settings1,8774.2577.31103.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • fasterimage_admin_notices
    • theysaidso_admin_options
    • fasterimage_account_valid_expiration
    • fasterimage_account_valid
    • fasterimage_enabled
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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 fix the following items
  • 166× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'fasterImage_AdminPageFramework_Widget_Model' not found in wp-content/plugins/fasterimage/lib/afp/factory/AdminPageFramework_Widget/AdminPageFramework_Widget_View.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'fasterImage_AdminPageFramework_Form_Model' not found in wp-content/plugins/fasterimage/lib/afp/factory/AdminPageFramework/AdminPageFramework_Form_View.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'fasterImage_AdminPageFramework_FieldType' not found in wp-content/plugins/fasterimage/lib/afp/factory/AdminPageFramework_Factory/view/AdminPageFramework_FieldType/AdminPageFramework_FieldType_text.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/fasterimage/lib/afp/factory/AdminPageFramework_Factory/view/AdminPageFramework_FieldType/AdminPageFramework_WalkerTaxonomyChecklist.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'fasterImage_AdminPageFramework_FieldType' not found in wp-content/plugins/fasterimage/lib/afp/factory/AdminPageFramework_Factory/view/AdminPageFramework_FieldType/AdminPageFramework_FieldType_hidden.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'fasterImage_AdminPageFramework_MetaBox_Model' not found in wp-content/plugins/fasterimage/lib/afp/factory/AdminPageFramework_MetaBox/AdminPageFramework_MetaBox_View.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'fasterImage_AdminPageFramework_Debug' not found in wp-content/plugins/fasterimage/lib/afp/factory/AdminPageFramework_Factory/controller/AdminPageFramework_HelpPane_Base.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'fasterImage_AdminPageFramework_Property_Base' not found in wp-content/plugins/fasterimage/lib/afp/factory/AdminPageFramework_MetaBox/model/AdminPageFramework_Property_MetaBox.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'fasterImage_AdminPageFramework_FieldType_image' not found in wp-content/plugins/fasterimage/lib/afp/factory/AdminPageFramework_Factory/view/AdminPageFramework_FieldType/AdminPageFramework_FieldType_media.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'fasterImage_AdminPageFramework_FieldType_Base' not found in wp-content/plugins/fasterimage/lib/afp/factory/AdminPageFramework_Factory/view/AdminPageFramework_FieldType/AdminPageFramework_FieldType.php:8

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: image compression, picture optimization, image compress, sitespeed, webperf

fasterimage/fasterimage.php Passed 13 tests

The main file in "fasterImage Image Optimizer" v. 2.5.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
51 characters long description:
Optimisez vos images & accélérez votre site web !

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin13,457 lines of code in 190 files:
LanguageFilesBlank linesComment linesLines of code
PHP1877391,73712,901
PO File1189205436
CSS1130113
JavaScript1137

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity11.18
▷ Minimum class complexity1.00
▷ Maximum class complexity157.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes180
▷ Abstract classes7943.89%
▷ Concrete classes10156.11%
▷ Final classes21.98%
Methods1,152
▷ Static methods16814.58%
▷ Public methods60052.08%
▷ Protected methods24521.27%
▷ Private methods30726.65%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants321.43%
▷ Class constants1178.57%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/img/ok.png1.32KB0.28KB▼ 78.54%
src/img/ko.png1.38KB0.27KB▼ 80.24%