72% forcesslswitcher

Code Review | Force SSL Switcher

WordPress plugin Force SSL Switcher scored72%from 54 tests.

About plugin

  • Plugin page: forcesslswitcher
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.6
  • WordPress version: 6.3.1
  • First release: Jan 21, 2021
  • Latest release: Jan 21, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: ldirenro26 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,071 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.18MB] [CPU: ▼15.31ms] Passed 4 tests

An overview of server-side resources used by Force SSL Switcher
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0327.73 ▼14.71
Dashboard /wp-admin3.13 ▼0.1840.26 ▼11.90
Posts /wp-admin/edit.php3.42 ▲0.0652.58 ▼4.15
Add New Post /wp-admin/post-new.php5.42 ▼0.4772.01 ▼21.16
Media Library /wp-admin/upload.php3.20 ▼0.0329.47 ▼13.45
General /wp-admin/admin.php?page=wps-general3.2733.85
Support /wp-admin/admin.php?page=wps-support3.2633.82

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Force SSL Switcher
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲5613.29 ▼1.081.52 ▼0.5443.49 ▼1.94
Dashboard /wp-admin2,233 ▲424.87 ▼1.04113.70 ▲12.8138.81 ▼5.93
Posts /wp-admin/edit.php2,116 ▲242.05 ▲0.0439.90 ▼2.5135.06 ▼3.92
Add New Post /wp-admin/post-new.php1,558 ▲3023.32 ▲4.92651.31 ▼4.0255.51 ▼6.02
Media Library /wp-admin/upload.php1,415 ▲244.23 ▼0.0196.92 ▼8.0443.99 ▲0.11
General /wp-admin/admin.php?page=wps-general8902.0627.3128.44
Support /wp-admin/admin.php?page=wps-support8202.0624.6728.87

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 60 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps-support
    • > Notice in wp-content/plugins/forcesslswitcher/include/fix-resource-hooks.php+14
    Trying to access array offset on value of type bool

SRP 0% 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
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/forcesslswitcher/include/main-class.php
    • > /wp-content/plugins/forcesslswitcher/main.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/forcesslswitcher/include/templates/settings_general.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/forcesslswitcher/include/templates/settings_support.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
6 plugin tags: ssl migration, 443, ssl, redirect, https...

forcesslswitcher/main.php 85% from 13 tests

The main file in "Force SSL Switcher" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("forcesslswitcher.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin319 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP53335252
PO File1212267

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin