78% wp-squish

Code Review | WP Squish

WordPress plugin WP Squish scored 78% from 54 tests.

About plugin

  • Plugin page: wp-squish
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 17, 2017
  • Latest release: Dec 17, 2022
  • Number of updates: 15
  • Update frequency: every 139.8 days
  • Top authors: hearken (86.67%)annaqq (13.33%)aspengrovestudios (13.33%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,508 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.97ms] Passed 4 tests

This is a short check of server-side resources used by WP Squish
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1144.56 ▲4.01
Dashboard /wp-admin3.41 ▲0.1044.33 ▼2.00
Posts /wp-admin/edit.php3.52 ▲0.1646.42 ▼2.71
Add New Post /wp-admin/post-new.php6.01 ▲0.1383.00 ▼20.40
Media Library /wp-admin/upload.php3.35 ▲0.1336.16 ▲1.22
WP Squish /wp-admin/options-general.php?page=pp_wpsq3.3032.74

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Squish
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.48 ▼0.271.82 ▲0.0644.98 ▼0.41
Dashboard /wp-admin2,210 ▲224.87 ▼1.05111.13 ▲2.2339.46 ▼4.86
Posts /wp-admin/edit.php2,090 ▲12.06 ▲0.0439.15 ▼2.5139.21 ▲3.61
Add New Post /wp-admin/post-new.php1,536 ▼623.17 ▲0.09657.72 ▲62.6551.37 ▲2.91
Media Library /wp-admin/upload.php1,395 ▲44.19 ▼0.01105.96 ▲6.2847.72 ▼0.26
WP Squish /wp-admin/options-general.php?page=pp_wpsq2,0624.69150.5072.05

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-squish/plugin-credit.php:10
    • > PHP Notice
      Undefined variable: potent_slug in wp-content/plugins/wp-squish/plugin-credit.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WPSquish' not found in wp-content/plugins/wp-squish/includes/pro/pro.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=pp_wpsq
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/options-general.php?page=pp_wpsq
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: compression, compress, size, resize, media...

wp-squish/wp-squish.php 92% from 13 tests

This is the main PHP file of "WP Squish" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 188 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,295 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP614868723
JavaScript37194356
CSS270160
Markdown221056

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.45
Average class complexity23.20
▷ Minimum class complexity16.00
▷ Maximum class complexity36.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods33
▷ Static methods412.12%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/potent-logo.png7.60KB5.27KB▼ 30.74%