84% ctw-ssl-for-cloudflare

Code Review | Cloudflare SSL by Weslink

WordPress plugin Cloudflare SSL by Weslink scored84%from 54 tests.

About plugin

  • Plugin page: ctw-ssl-for-cloud...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-5.0.2
  • WordPress version: 6.3.1
  • First release: Sep 29, 2015
  • Latest release: Jan 8, 2019
  • Number of updates: 14
  • Update frequency: every 86.1 days
  • Top authors: weslink (78.57%)cetewe (28.57%)

Code review

54 tests

User reviews

6 reviews

Install metrics

6,000+ active /46,039 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Cloudflare SSL by Weslink
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.14 ▼7.01
Dashboard /wp-admin3.31 ▲0.0141.99 ▼6.43
Posts /wp-admin/edit.php3.36 ▲0.0144.74 ▼1.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.49 ▼3.83
Media Library /wp-admin/upload.php3.23 ▲0.0132.81 ▲1.97

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Cloudflare SSL by Weslink
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.79 ▲0.251.70 ▼0.5438.45 ▼2.31
Dashboard /wp-admin2,200 ▲94.89 ▲0.01150.93 ▲43.4456.20 ▲11.07
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.1439.26 ▲2.4729.76 ▼3.57
Add New Post /wp-admin/post-new.php1,533 ▲1423.18 ▼0.06657.79 ▼32.1852.56 ▲1.78
Media Library /wp-admin/upload.php1,385 ▼64.21 ▼0.01100.67 ▼2.2442.38 ▼1.03

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

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ctw-ssl-for-cloudflare/plugin.php:53

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 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: ssl, cloudflare, ctw ssl, https, flexible ssl...

ctw-ssl-for-cloudflare/plugin.php 85% from 13 tests

The main file in "Cloudflare SSL by Weslink" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ctw-ssl-for-cloudflare.php" instead of "plugin.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
No dangerous file extensions were detected28 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131628

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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 images were found in this plugin