57% wp-free-ssl

Code Review | WP Free SSL - Free SSL Certificate for WordPress and force HTTPS

WordPress plugin WP Free SSL - Free SSL Certificate for WordPress and force HTTPS scored 57% from 54 tests.

About plugin

  • Plugin page: wp-free-ssl
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Jul 30, 2020
  • Latest release: Jul 6, 2023
  • Number of updates: 43
  • Update frequency: every 25.9 days
  • Top authors: prasadkirpekar (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

2,000+ active / 33,133 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.55MB] [CPU: ▲8.44ms] Passed 4 tests

A check of server-side resources used by WP Free SSL - Free SSL Certificate for WordPress and force HTTPS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6152.88 ▲14.73
Dashboard /wp-admin3.91 ▲0.6154.71 ▲11.41
Posts /wp-admin/edit.php3.96 ▲0.6154.42 ▲6.22
Add New Post /wp-admin/post-new.php6.43 ▲0.55118.94 ▲20.25
Media Library /wp-admin/upload.php3.68 ▲0.4541.80 ▲1.41
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0041.20

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 440 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
widget_recent-posts
fs_accounts
db_upgraded
fs_active_plugins
wpssl_basedomainwww
fs_debug_mode
widget_theysaidso_widget
can_compress_scripts
wpssl_basedomain
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Free SSL - Free SSL Certificate for WordPress and force HTTPS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8714.23 ▲0.092.24 ▲0.3041.92 ▼7.56
Dashboard /wp-admin2,236 ▲515.86 ▲0.01126.63 ▼1.4378.09 ▲29.42
Posts /wp-admin/edit.php2,125 ▲332.01 ▼0.0348.09 ▲6.7560.68 ▲20.82
Add New Post /wp-admin/post-new.php1,686 ▲17222.17 ▲0.51689.39 ▼72.1765.21 ▲4.81
Media Library /wp-admin/upload.php1,415 ▲304.21 ▲0.05117.22 ▼22.7885.22 ▲15.60
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0891.6730.8835.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-free-ssl/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 11 options in the database
    • db_upgraded
    • wpssl_basedomainwww
    • wpssl_basedomain
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • fs_active_plugins
    • fs_debug_mode
    • fs_accounts
    • widget_recent-posts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-free-ssl/admin/pages/plans.php
    • > /wp-content/plugins/wp-free-ssl/admin/pages/autoinstall.php
  • 82× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/wp-free-ssl/lib/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:7
    • > PHP Warning
      require_once(lib/byte_safe_strings.php): failed to open stream: No such file or directory in wp-content/plugins/wp-free-ssl/lib/vendor/paragonie/random_compat/psalm-autoload.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'LEClient\\Exceptions\\LEException' not found in wp-content/plugins/wp-free-ssl/lib/classes/LEClient/Exceptions/LEConnectorException.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-free-ssl/admin/pages/enablehttps.php:4
    • > PHP Fatal error
      Cannot declare class DivisionByZeroError, because the name is already in use in wp-content/plugins/wp-free-ssl/lib/vendor/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php on line 0
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/wp-free-ssl/lib/vendor/guzzlehttp/promises/src/AggregateException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/wp-free-ssl/lib/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-free-ssl/lib/vendor/guzzlehttp/psr7/src/BufferStream.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/wp-free-ssl/lib/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-free-ssl/lib/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Settings Window), #2 (After activation), #3 (Before activation)
  • Donate link: Invalid url: "- https://paypal.me/prasadkirpekar"
The official readme.txt is a good inspiration

wp-free-ssl/wp-free-ssl.php 92% from 13 tests

This is the main PHP file of "WP Free SSL - Free SSL Certificate for WordPress and force HTTPS" version 1.2.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 75 characters long)

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
It is important to fix the following items
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/wp-free-ssl/cabundle/ca.crt
71,921 lines of code in 370 files:
LanguageFilesBlank linesComment linesLines of code
PHP29710,97924,90864,858
Markdown271,69705,014
JSON15001,265
JavaScript516170658
XML30050
make213433
CSS150017
Dockerfile18010
YAML11010
Bourne Shell1203
SVG3003

PHP code 0% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity34.87
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces19
Interfaces19
Traits5
Classes164
▷ Abstract classes21.22%
▷ Concrete classes16298.78%
▷ Final classes2213.58%
Methods2,176
▷ Static methods38917.88%
▷ Public methods1,62074.45%
▷ Protected methods251.15%
▷ Private methods53124.40%
Functions286
▷ Named functions19367.48%
▷ Anonymous functions9332.52%
Constants362
▷ Global constants14439.78%
▷ Class constants21860.22%
▷ Public constants218100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
admin/assets/img/icon.png4.52KB0.41KB▼ 90.88%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
admin/assets/img/ssl.png19.69KB3.38KB▼ 82.83%