84% advanced-https-redirection

Code Review | Advanced Https Redirection

WordPress plugin Advanced Https Redirection scored 84% from 54 tests.

About plugin

  • Plugin page: advanced-https-re...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 23, 2018
  • Latest release: Mar 28, 2018
  • Number of updates: 4
  • Update frequency: every 8.2 days
  • Top authors: ehabsan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 680 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.10MB] [CPU: ▼8.54ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Https Redirection
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0331.54 ▼11.31
Dashboard /wp-admin3.34 ▲0.0348.59 ▼2.18
Posts /wp-admin/edit.php3.39 ▲0.0350.44 ▼0.14
Add New Post /wp-admin/post-new.php5.47 ▼0.4275.53 ▼20.54
Media Library /wp-admin/upload.php3.26 ▲0.0335.78 ▲0.09
Advanced Https Redirect /wp-admin/options-general.php?page=advanced-https-redirection3.2033.16

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
ahr-random-anchor-number
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Https Redirection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.48 ▼0.111.71 ▼0.0138.05 ▼12.85
Dashboard /wp-admin2,207 ▲164.87 ▼1.01106.31 ▲1.9040.93 ▼2.89
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0439.00 ▲1.0635.73 ▼0.38
Add New Post /wp-admin/post-new.php6,470 ▲4,93719.87 ▼3.35885.56 ▲201.2252.33 ▼1.94
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.02100.63 ▼0.9340.35 ▼4.40
Advanced Https Redirect /wp-admin/options-general.php?page=advanced-https-redirection7722.0323.7523.98

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

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=advanced-https-redirection
    • > Warning in wp-content/plugins/advanced-https-redirection/admin/index.php+471
    include(/templates/options-page.tpl): failed to open stream: No such file or directory
    • > GET request to /wp-admin/options-general.php?page=advanced-https-redirection
    • > Warning in wp-content/plugins/advanced-https-redirection/admin/index.php+471
    include(): Failed opening '/templates/options-page.tpl' for inclusion (include_path='.:/usr/share/php')

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: ssl, automatic redirection, htaccess, redirection, https

advanced-https-redirection/advanced-https-redirection.php 92% from 13 tests

"Advanced Https Redirection" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin494 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3221262332
CSS1170102
JavaScript217660

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/question-mark.png0.38KB0.13KB▼ 65.63%