10% htaccess

Code Review | Htaccess by BestWebSoft - WordPress Website Access Control Plugin

WordPress plugin Htaccess by BestWebSoft - WordPress Website Access Control Plugin scored10%from 54 tests.

About plugin

  • Plugin page: htaccess
  • Plugin version: 1.8.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Feb 11, 2014
  • Latest release: Aug 11, 2023
  • Number of updates: 54
  • Update frequency: every 64.2 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /36,268 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/htaccess/htaccess.php+159
    Trying to access array offset on value of type null

Server metrics [RAM: ▲0.81MB] [CPU: ▲3.92ms] Passed 4 tests

Server-side resources used by Htaccess by BestWebSoft - WordPress Website Access Control Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.8451.04 ▲11.52
Dashboard /wp-admin4.14 ▲0.8456.08 ▲4.76
Posts /wp-admin/edit.php4.19 ▲0.8461.30 ▲5.79
Add New Post /wp-admin/post-new.php6.68 ▲0.7998.20 ▼1.27
Media Library /wp-admin/upload.php4.00 ▲0.7746.83 ▲6.38

Server storage [IO: ▲4.81MB] [DB: ▲0.31MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 120 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
db_upgraded
bstwbsftwppdtplgns_options
widget_recent-posts
widget_theysaidso_widget
htccss_options
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Htaccess by BestWebSoft - WordPress Website Access Control Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.26 ▲0.062.01 ▲0.4043.40 ▲2.31
Dashboard /wp-admin2,231 ▲545.56 ▼0.0590.14 ▲2.1741.94 ▼1.60
Posts /wp-admin/edit.php2,145 ▲452.04 ▲0.0339.42 ▲2.0136.22 ▲1.72
Add New Post /wp-admin/post-new.php1,561 ▲3523.56 ▼0.07684.50 ▼22.9050.02 ▼10.72
Media Library /wp-admin/upload.php1,442 ▲454.22 ▲0.0996.85 ▼18.0744.36 ▼2.43
Htaccess /wp-admin/htaccess.php260.420.1714.52
Editor /wp-admin/htaccess-editor.php260.420.088.42
BWS Panel /wp-admin/htaccess.php?page=htccss-bws-panel260.420.075.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/htaccess/bws_menu/product_list.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/htaccess/htaccess.php:1498
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/htaccess/bws_menu/class-bws-settings.php:1452
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/htaccess/includes/class-htccss-settings.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/htaccess.php
    • > Network (severe)
    wp-admin/htaccess.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/htaccess-editor.php
    • > Network (severe)
    wp-admin/htaccess-editor.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/htaccess.php?page=htccss-bws-panel
    • > Network (severe)
    wp-admin/htaccess.php?page=htccss-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: Add images for these screenshots: #1 (Plugin settings page.), #2 (Plugin network settings page.), #3 (Plugin editor page.)
You can look at the official readme.txt

htaccess/htaccess.php Passed 13 tests

The main PHP file in "Htaccess by BestWebSoft - WordPress Website Access Control Plugin" ver. 1.8.5 adds more information about the plugin and also serves as the entry point for this plugin
93 characters long description:
Protect WordPress website – allow and deny access for certain IP addresses, hostnames, etc.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin20,138 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PO File113,7225,6507,991
PHP95537495,783
CSS101892765,554
JavaScript749132660
SVG400150

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity101.33
▷ Minimum class complexity21.00
▷ Maximum class complexity210.00
Average method complexity13.54
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods1875.00%
▷ Protected methods00.00%
▷ Private methods625.00%
Functions91
▷ Named functions91100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
62 PNG files occupy 3.14MB with 1.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_glass_75_dadada_1x400.png0.32KB0.16KB▼ 50.46%
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_glass_75_dadada_1x400.png0.31KB0.18KB▼ 39.81%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
bws_menu/icons/themes/rent-a-bike.png273.38KB112.59KB▼ 58.82%
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_glass_95_fef1ec_1x400.png0.38KB0.17KB▼ 53.39%