79% lcs-https

Code Review | LCS HTTPS

WordPress plugin LCS HTTPS scored79%from 54 tests.

About plugin

  • Plugin page: lcs-https
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 6.3.1
  • First release: Jul 27, 2016
  • Latest release: May 6, 2019
  • Number of updates: 5
  • Update frequency: every 202.4 days
  • Top authors: latcomsystems (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.28MB] [CPU: ▼10.57ms] Passed 4 tests

An overview of server-side resources used by LCS HTTPS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.27 ▼1.199.68 ▼29.55
Dashboard /wp-admin3.33 ▲0.0247.26 ▼3.33
Posts /wp-admin/edit.php3.38 ▲0.0250.54 ▼5.81
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.28 ▼3.57
Media Library /wp-admin/upload.php3.25 ▲0.0238.48 ▲1.25
LCS HTTPS /wp-admin/options-general.php?page=lcs_https_options3.1931.79

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

How much does this plugin use your filesystem and database?
The 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
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by LCS HTTPS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.65 ▼0.651.98 ▼0.1246.05 ▲3.91
Dashboard /wp-admin2,210 ▲224.82 ▼0.05115.47 ▼17.5243.12 ▲3.81
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0140.86 ▲0.5535.84 ▼4.00
Add New Post /wp-admin/post-new.php1,542 ▲923.13 ▼0.24662.24 ▼16.6558.59 ▲5.95
Media Library /wp-admin/upload.php1,392 ▲44.14 ▼0.08110.13 ▲3.4746.49 ▲0.13
LCS HTTPS /wp-admin/options-general.php?page=lcs_https_options8162.0225.0642.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=lcs_https_options
    • > Notice in wp-content/plugins/lcs-https/lcs-https.php+88
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lcs-https/lcs-https.php:123

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: specific, http, https, page, pages...

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

The main file in "LCS HTTPS" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
80 characters long description:
This plugin redirects specific pages to HTTPS. All other pages will remain HTTP.

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
Everything looks great! No dangerous files found in this plugin107 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11111107

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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