84% simple-https-redirect

Code Review | Simple HTTPS Redirect

WordPress plugin Simple HTTPS Redirect scored 84% from 54 tests.

About plugin

  • Plugin page: simple-https-redi...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Nov 10, 2019
  • Latest release: May 18, 2022
  • Number of updates: 20
  • Update frequency: every 46.0 days
  • Top authors: lightplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 6,839 total downloads

Benchmarks

Plugin footprint 83% 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.03MB] [CPU: ▼5.93ms] Passed 4 tests

Analyzing server-side resources used by Simple HTTPS Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.88 ▼6.63
Dashboard /wp-admin3.33 ▲0.0344.95 ▼2.26
Posts /wp-admin/edit.php3.38 ▲0.0349.43 ▼3.46
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.69 ▼11.38
Media Library /wp-admin/upload.php3.25 ▲0.0335.29 ▲1.49
Simple https Redirect /wp-admin/options-general.php?page=simple-https-redirect3.2430.95

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Simple HTTPS Redirect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.78 ▲0.381.85 ▼0.1744.92 ▲0.24
Dashboard /wp-admin2,207 ▲195.81 ▲0.91105.06 ▼8.9339.98 ▼4.12
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0439.78 ▼1.9836.96 ▼0.53
Add New Post /wp-admin/post-new.php1,517 ▼217.60 ▼5.39691.18 ▲84.7275.87 ▲29.21
Media Library /wp-admin/upload.php1,392 ▲134.26 ▲0.05104.66 ▲1.0641.78 ▼2.63
Simple https Redirect /wp-admin/options-general.php?page=simple-https-redirect7961.7229.9230.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simple-https-redirect/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: https, force, ssl, redirect

simple-https-redirect/index.php 85% from 13 tests

The principal PHP file in "Simple HTTPS Redirect" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-https-redirect.php" instead of "index.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected206 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP18048114
CSS116079
JavaScript125313

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin