84% https-to-http-redirect

Code Review | HTTPS to HTTP Redirect

WordPress plugin HTTPS to HTTP Redirect scored84%from 54 tests.

About plugin

  • Plugin page: https-to-http-red...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Nov 28, 2017
  • Latest release: Nov 28, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: ratanmia (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /5,319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.97ms] Passed 4 tests

Server-side resources used by HTTPS to HTTP Redirect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.53 ▲2.16
Dashboard /wp-admin3.31 ▼0.0444.74 ▼15.87
Posts /wp-admin/edit.php3.36 ▲0.0048.05 ▼4.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.57 ▼15.10
Media Library /wp-admin/upload.php3.24 ▲0.0034.86 ▼0.53

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

HTTPS to HTTP Redirect: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.80 ▲0.451.73 ▼0.2344.18 ▲4.98
Dashboard /wp-admin2,206 ▲155.83 ▲0.9693.01 ▼5.5637.94 ▼3.91
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0240.14 ▲0.5135.02 ▼2.84
Add New Post /wp-admin/post-new.php1,533 ▲1923.43 ▲5.65622.07 ▼22.7154.78 ▲1.88
Media Library /wp-admin/upload.php1,388 ▲64.20 ▼0.0894.36 ▼6.7743.94 ▼1.41

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/https-to-http-redirect/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
There were not plugin tags detected

https-to-http-redirect/index.php 92% from 13 tests

The main file in "HTTPS to HTTP Redirect" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("https-to-http-redirect.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin14 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121014

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin