84% frontend-http-authentication-protection

Code Review | Frontend HTTP Auth Protection

WordPress plugin Frontend HTTP Auth Protection scored84%from 54 tests.

About plugin

  • Plugin page: frontend-http-aut...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-4.7
  • WordPress version: 6.3.1
  • First release: Apr 1, 2016
  • Latest release: Apr 1, 2016
  • Number of updates: 10
  • Update frequency: every 25.3 days
  • Top authors: pmbaldha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,922 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.13MB] [CPU: ▼10.17ms] Passed 4 tests

Server-side resources used by Frontend HTTP Auth Protection
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6218.78 ▼24.37
Dashboard /wp-admin3.33 ▲0.0348.78 ▲1.02
Posts /wp-admin/edit.php3.39 ▲0.0345.26 ▼4.73
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.28 ▼10.69
Media Library /wp-admin/upload.php3.26 ▲0.0336.00 ▼0.89
Frontend HTTP Authentication /wp-admin/options-general.php?page=fhauth_setting3.2838.11

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
fhauth_setting
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Frontend HTTP Auth Protection: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,425 ▼34614.70 ▲0.340.68 ▼1.443.56 ▼43.10
Dashboard /wp-admin2,213 ▲254.85 ▼0.01106.11 ▼3.9140.09 ▼5.86
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0135.71 ▼5.2633.30 ▼5.66
Add New Post /wp-admin/post-new.php1,517 ▼723.53 ▲0.09667.45 ▼23.4780.16 ▲28.25
Media Library /wp-admin/upload.php1,386 ▲44.23 ▲0.05100.45 ▲3.0144.75 ▼1.29
Frontend HTTP Authentication /wp-admin/options-general.php?page=fhauth_setting1,5366.66163.2769.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/frontend-http-authentication-protection/frontend-http-authentication-protection.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: frontend, protection, auth, security, http

frontend-http-authentication-protection/frontend-http-authentication-protection.php 92% from 13 tests

Analyzing the main PHP file in "Frontend HTTP Auth Protection" version 0.1
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 471 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected168 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22752168

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions11
▷ Named functions11100.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
3 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png127.05KB39.24KB▼ 69.12%
assets/screenshot-2.png22.01KB8.69KB▼ 60.51%
assets/screenshot-3.png11.28KB4.17KB▼ 62.97%