74% femora-compress

Code Review | Femora Compress - WEBP - PNG - JPG

WordPress plugin Femora Compress - WEBP - PNG - JPG scored 74% from 54 tests.

About plugin

  • Plugin page: femora-compress
  • Plugin version: 0.51.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.0.3
  • WordPress version: 6.3.1
  • First release: Oct 28, 2020
  • Latest release: Oct 27, 2022
  • Number of updates: 63
  • Update frequency: every 11.6 days
  • Top authors: femorapro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,299 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▲16.46ms] Passed 4 tests

Analyzing server-side resources used by Femora Compress - WEBP - PNG - JPG
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4059.50 ▲20.89
Dashboard /wp-admin3.61 ▲0.3061.34 ▲14.97
Posts /wp-admin/edit.php3.66 ▲0.3067.41 ▲20.63
Add New Post /wp-admin/post-new.php6.14 ▲0.2699.66 ▲9.36
Media Library /wp-admin/upload.php3.47 ▲0.2455.77 ▲22.03
Setting /wp-admin/admin.php?page=femora_configuracion3.4254.98
Femora Compress /wp-admin/admin.php?page=femora_compress3.4455.33

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 146 new files
Database: 2 new tables, 6 new options
New tables
wp_femora_usage_statistics
wp_femora_pending_images
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Femora Compress - WEBP - PNG - JPG
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲14713.81 ▼0.561.83 ▲0.0841.65 ▲0.00
Dashboard /wp-admin2,263 ▲755.56 ▲0.68108.19 ▲5.6840.15 ▼0.99
Posts /wp-admin/edit.php2,149 ▲602.27 ▲0.2344.87 ▲11.1031.71 ▼3.79
Add New Post /wp-admin/post-new.php1,566 ▲3022.32 ▼1.38674.83 ▲12.7738.49 ▼16.59
Media Library /wp-admin/upload.php1,448 ▲604.65 ▲0.46109.69 ▼0.2147.40 ▲0.53
Setting /wp-admin/admin.php?page=femora_configuracion9752.2839.0826.88
Femora Compress /wp-admin/admin.php?page=femora_compress1,6663.2295.4851.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_femora_usage_statistics
    • wp_femora_pending_images
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/femora-compress/vendor/deliciousbrains/wp-background-processing/wp-background-processing.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/femora-compress/admin/femora-compress-background-process.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Background_Process' not found in wp-content/plugins/femora-compress/classes/class-femora-compress-background-async.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Background_Process' not found in wp-content/plugins/femora-compress/admin/class-femora-compress-background-async.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/femora-compress/classes/wp-background-process.php:14

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 on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Register a new account.), #2 (Start the optimization in your WordPress site. (NOTE: the optimization process will include all the images regadless the size)), #3 (Right after the optimization you will see the improvement in the images.)
You can look at the official readme.txt

femora-compress/femora-compress.php Passed 13 tests

The principal PHP file in "Femora Compress - WEBP - PNG - JPG" v. 0.51.3 is loaded by WordPress automatically on each request
110 characters long description:
Converte to Webp, super compresses JPG and PNG images with the best quality for the web and the smallest size.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin29,051 lines of code in 101 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript266,30121,39021,508
CSS212271623,737
PHP446971,5282,968
Sass39337478
Markdown1600112
HTML261090
PO File1324285
JSON20072
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.90
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes20
▷ Abstract classes420.00%
▷ Concrete classes1680.00%
▷ Final classes00.00%
Methods161
▷ Static methods159.32%
▷ Public methods11571.43%
▷ Protected methods4024.84%
▷ Private methods63.73%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
22 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/libraries/css/DataTables-1.10.18/images/sort_both.png0.20KB0.20KB0.00%
admin/libraries/images/sort_desc.png0.18KB0.18KB0.00%
admin/libraries/images/sort_both.png0.20KB0.20KB0.00%
assets/images/icono-username.png0.37KB0.20KB▼ 45.77%
assets/images/icono-password.png0.41KB0.21KB▼ 48.44%