77% high-compress

Code Review | Highcompress Image Compressor

WordPress plugin Highcompress Image Compressor scored77%from 54 tests.

About plugin

  • Plugin page: high-compress
  • Plugin version: 6.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 3, 2017
  • Latest release: Aug 18, 2023
  • Number of updates: 119
  • Update frequency: every 18.5 days
  • Top authors: himalayasaxena (100%)

Code review

54 tests

User reviews

142 reviews

Install metrics

1,000+ active /25,020 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: ▲0.04MB] [CPU: ▲320.59ms] 50% from 4 tests

Server-side resources used by Highcompress Image Compressor
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 891.86ms on /wp-admin/upload.php?page=highcompress-optimizer)
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 320.59ms on /wp-admin/upload.php?page=highcompress-optimizer)
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.22 ▼5.68
Dashboard /wp-admin3.40 ▲0.06499.88 ▲433.45
Posts /wp-admin/edit.php3.45 ▲0.10489.92 ▲438.26
Add New Post /wp-admin/post-new.php5.94 ▲0.05526.20 ▲416.88
Media Library /wp-admin/upload.php3.26 ▲0.03473.82 ▲437.69
Bulk Optimizer /wp-admin/upload.php?page=highcompress-optimizer3.32891.86

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 58 new files
Database: no new tables, 24 new options
New WordPress options
HIGHCOMPRESS_OFFSET_OFF_1536x1536
HIGHCOMPRESS_FILE_TYPE
HIGHCOMPRESS_MY
HIGHCOMPRESS_OFFSET_OFF_full
widget_theysaidso_widget
HIGHCOMPRESS_OFFSET_OFF_medium
theysaidso_admin_options
HIGHCOMPRESS_OFFSET_OFF_thumbnail
HIGHCOMPRESS_PERCENT
HIGHCOMPRESS_PLAN
...

Browser metrics Passed 4 tests

A check of browser resources used by Highcompress Image Compressor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.28 ▼0.101.60 ▲0.0638.94 ▼2.51
Dashboard /wp-admin2,220 ▲435.64 ▼0.0384.90 ▼4.0141.67 ▲0.18
Posts /wp-admin/edit.php2,125 ▲222.03 ▲0.0536.56 ▼3.6033.87 ▼2.14
Add New Post /wp-admin/post-new.php1,547 ▲2123.33 ▼0.18634.32 ▼67.1658.21 ▼1.96
Media Library /wp-admin/upload.php1,422 ▲224.17 ▼0.0199.41 ▼9.7244.33 ▼4.49
Bulk Optimizer /wp-admin/upload.php?page=highcompress-optimizer1,3142.2452.20134.24

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 23 options
    • HIGHCOMPRESS_OFFSET_OFF_medium_large
    • widget_theysaidso_widget
    • HIGHCOMPRESS_COUNT
    • widget_recent-comments
    • db_upgraded
    • HIGHCOMPRESS_AUTOBACKUP_RULE
    • HIGHCOMPRESS_PLAN
    • HIGHCOMPRESS_VERSION_TAG
    • can_compress_scripts
    • HIGHCOMPRESS_AUTOCOMPRESS_RULE
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/upload.php?page=highcompress-optimizer
    • > Notice in wp-content/plugins/high-compress/inc/functions/optimizer-ui.php+118
    Undefined variable: percent

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/high-compress/highcompress.php
    • > /wp-content/plugins/high-compress/inc/functions/optimizer-ui.php
    • > /wp-content/plugins/high-compress/inc/functions/verifyapi.php
    • > /wp-content/plugins/high-compress/uninstall.php
    • > /wp-content/plugins/high-compress/inc/functions/process.php
    • > /wp-content/plugins/high-compress/inc/3rd-party/banners.php
    • > /wp-content/plugins/high-compress/inc/functions/autocompress.php
    • > /wp-content/plugins/high-compress/inc/functions/admin-ui.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

high-compress/highcompress.php 92% from 13 tests

The main PHP file in "Highcompress Image Compressor" ver. 6.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("high-compress.php" instead of "highcompress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin20,819 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript131,1979007,637
CSS89431486,680
SVG5044,984
PHP8258461,483
HTML50035

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
8 PNG files occupy 0.14MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/spacer.png23.15KB3.30KB▼ 85.76%
assets/img/under-header.png15.02KB1.16KB▼ 92.28%
assets/img/cloud_02.png15.42KB0.75KB▼ 95.12%
assets/img/cloud_01.png15.62KB1.01KB▼ 93.50%
assets/img/earth.png21.14KB3.73KB▼ 82.37%