100% force-https-srcset

Code Review | Force HTTPS srcset

WordPress plugin Force HTTPS srcset scored 100% from 54 tests.

About plugin

  • Plugin page: force-https-srcset
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4
  • WordPress version: 5.8.1
  • First release: Dec 19, 2015
  • Latest release: Dec 19, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: hnle (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active / 3,185 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼143.09ms] Passed 4 tests

A check of server-side resources used by Force HTTPS srcset
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1340.30 ▲17.66
Dashboard /wp-admin3.08 ▲0.0240.60 ▼4.48
Posts /wp-admin/edit.php3.13 ▲0.0245.03 ▼0.62
Add New Post /wp-admin/post-new.php5.44 ▲0.01100.79 ▼562.91
Media Library /wp-admin/upload.php3.02 ▲0.0138.61 ▼4.35

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Force HTTPS srcset
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.87 ▲0.3310.39 ▲0.3160.24 ▲7.26
Dashboard /wp-admin2,970 ▲375.98 ▼0.10150.52 ▼7.84121.78 ▼1.81
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0271.74 ▼1.3491.33 ▼1.29
Add New Post /wp-admin/post-new.php1,683 ▼018.76 ▲3.02400.28 ▼12.68115.65 ▼11.54
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.02163.39 ▼19.02123.12 ▼10.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: srcset, responsive images, https

force-https-srcset/force-https-srcset.php Passed 13 tests

Analyzing the main PHP file in "Force HTTPS srcset" version 1.0
55 characters long description:
Replace Responsive images srcset since wp 4.4 to https!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected48 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1213248

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods00.00%
▷ Private methods444.44%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin