89% http-auth

Code Review | HTTP Auth

WordPress plugin HTTP Auth scored89%from 54 tests.

About plugin

  • Plugin page: http-auth
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2016
  • Latest release: Jul 28, 2023
  • Number of updates: 35
  • Update frequency: every 77.6 days
  • Top authors: sasiddiqui (85.71%)aliya yasir (17.14%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active /38,957 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.01MB] [CPU: ▼1.83ms] Passed 4 tests

An overview of server-side resources used by HTTP Auth
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.05 ▼5.28
Dashboard /wp-admin3.32 ▲0.0245.36 ▲1.48
Posts /wp-admin/edit.php3.37 ▲0.0144.93 ▼2.69
Add New Post /wp-admin/post-new.php5.90 ▲0.01100.28 ▲5.13
Media Library /wp-admin/upload.php3.24 ▲0.0135.59 ▼0.83
Settings /wp-admin/admin.php?page=http-auth-settings3.2732.57
About /wp-admin/admin.php?page=http-auth-about-plugins3.2729.77

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by HTTP Auth
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.22 ▼0.951.59 ▼0.3340.29 ▼0.22
Dashboard /wp-admin2,233 ▲454.85 ▼0.05110.22 ▲4.7141.70 ▼2.28
Posts /wp-admin/edit.php2,119 ▲272.00 ▲0.0038.65 ▼1.0234.51 ▼4.19
Add New Post /wp-admin/post-new.php1,564 ▲2218.37 ▲0.12640.08 ▲37.3758.49 ▲5.32
Media Library /wp-admin/upload.php1,415 ▲274.22 ▲0.05105.69 ▼13.3745.05 ▼1.42
Settings /wp-admin/admin.php?page=http-auth-settings9222.0729.1826.39
About /wp-admin/admin.php?page=http-auth-about-plugins2,1802.0623.5941.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

http-auth/http-auth.php 92% from 13 tests

"HTTP Auth" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected8,817 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
SVG9118,119
PHP897260696
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.60
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods26
▷ Static methods00.00%
▷ Public methods1453.85%
▷ Protected methods00.00%
▷ Private methods1246.15%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/prevent-xss-vulnerability.png7.36KB7.25KB▼ 1.51%
assets/images/media-post-permalink.png24.03KB11.56KB▼ 51.92%