83% powered-minifier

Code Review | Powered Minifier

WordPress plugin Powered Minifier scored83%from 54 tests.

About plugin

  • Plugin page: powered-minifier
  • Plugin version: 1.7.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 17, 2019
  • Latest release: Sep 8, 2023
  • Number of updates: 145
  • Update frequency: every 10.7 days
  • Top authors: neoslab (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /10,750 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.91ms] Passed 4 tests

Analyzing server-side resources used by Powered Minifier
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.46 ▲3.47
Dashboard /wp-admin3.38 ▲0.0449.80 ▼8.34
Posts /wp-admin/edit.php3.50 ▲0.1443.91 ▲1.84
Add New Post /wp-admin/post-new.php5.96 ▲0.0880.41 ▼12.05
Media Library /wp-admin/upload.php3.30 ▲0.0835.62 ▲2.91
Powered Minifier /wp-admin/options-general.php?page=powered-minifier-admin3.3529.71

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
_powered_minifier

Browser metrics Passed 4 tests

An overview of browser requirements for Powered Minifier
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.41 ▼0.061.84 ▲0.1142.31 ▲4.48
Dashboard /wp-admin2,202 ▲245.56 ▼0.1795.54 ▼10.4644.68 ▲3.18
Posts /wp-admin/edit.php2,104 ▲41.96 ▲0.0134.75 ▼2.7434.47 ▼0.13
Add New Post /wp-admin/post-new.php1,529 ▲123.57 ▲0.13665.53 ▼1.4161.18 ▼0.74
Media Library /wp-admin/upload.php1,407 ▲104.17 ▲0.0799.17 ▼3.9943.47 ▼2.95
Powered Minifier /wp-admin/options-general.php?page=powered-minifier-admin1,1151.6824.6953.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/powered-minifier/admin/partials/powered-minifier-admin-options.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/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
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (A general view of the plugin "options" page.), #2 (A screenshot of the code source of a minified page.)
You can take inspiration from this readme.txt

powered-minifier/powered-minifier.php 92% from 13 tests

Analyzing the main PHP file in "Powered Minifier" version 1.7.5
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 170 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,595 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11132420832
CSS311844737
JavaScript21026

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity13.86
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods42
▷ Static methods24.76%
▷ Public methods3685.71%
▷ Protected methods00.00%
▷ Private methods614.29%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.61MB with 0.37MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png513.87KB145.97KB▼ 71.59%
screenshot-1.png106.42KB53.36KB▼ 49.85%