84% https-switcher

Code Review | Https Switcher

WordPress plugin Https Switcher scored84%from 54 tests.

About plugin

  • Plugin page: https-switcher
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: May 27, 2015
  • Latest release: Oct 2, 2016
  • Number of updates: 6
  • Update frequency: every 82.3 days
  • Top authors: janiko (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /10,532 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.43MB] [CPU: ▼32.48ms] Passed 4 tests

Server-side resources used by Https Switcher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0723.17 ▼15.16
Dashboard /wp-admin3.08 ▼0.2628.17 ▼34.48
Posts /wp-admin/edit.php3.22 ▼0.1333.81 ▼14.52
Add New Post /wp-admin/post-new.php4.61 ▼1.2742.79 ▼65.74
Media Library /wp-admin/upload.php3.15 ▼0.0725.24 ▼8.62

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Https Switcher
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▲1.311.60 ▼2.9536.94 ▼0.47
Dashboard /wp-admin2,195 ▲245.55 ▼0.0387.60 ▼4.9336.66 ▼2.54
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0438.47 ▲2.0134.92 ▼0.41
Add New Post /wp-admin/post-new.php1,526 ▼923.78 ▲5.67668.74 ▲39.4151.92 ▼18.79
Media Library /wp-admin/upload.php1,400 ▼34.25 ▲0.0695.37 ▼2.6040.69 ▼5.16

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/https-switcher/https-switcher.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: mixed content, http, https

https-switcher/https-switcher.php Passed 13 tests

The main file in "Https Switcher" v. 0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
64 characters long description:
Force http/https for resources, depending on the scheme you use.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin34 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16834

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected