10% wp-htaccess-control

Code Review | WP htaccess Control

WordPress plugin WP htaccess Control scored 10% from 54 tests.

About plugin

  • Plugin page: wp-htaccess-control
  • Plugin version: 3.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.3.1
  • WordPress version: 5.8.1
  • First release: Apr 8, 2009
  • Latest release: Oct 17, 2015
  • Number of updates: 238
  • Update frequency: every 10.0 days
  • Top authors: andrad (47.48%)antonioandra.de (29.83%)dardna (23.53%)

Code review

54 tests

User reviews

17 reviews

Install metrics

10,000+ active / 213,397 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-htaccess-control/wp-htaccess-control.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; WPhtc has a deprecated constructor

Server metrics [RAM: ▼1.60MB] [CPU: ▼186.09ms] Passed 4 tests

This is a short check of server-side resources used by WP htaccess Control
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼0.806.71 ▼27.98
Dashboard /wp-admin2.05 ▼1.005.96 ▼32.61
Posts /wp-admin/edit.php2.05 ▼1.056.80 ▼37.87
Add New Post /wp-admin/post-new.php2.05 ▼3.386.76 ▼639.44
Media Library /wp-admin/upload.php2.05 ▼0.956.76 ▼34.44
htaccess Control /wp-admin/options-general.php?page=wp-htaccess-control/wp-htaccess-control.php2.066.19

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 1 new option
New WordPress options
WPhtc_data

Browser metrics Passed 4 tests

Checking browser requirements for WP htaccess Control
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.82 ▲0.068.56 ▼1.6647.57 ▼3.17
Dashboard /wp-admin2,977 ▲465.85 ▼0.10154.57 ▲10.74112.36 ▼6.02
Posts /wp-admin/edit.php2,744 ▲52.72 ▼0.0165.99 ▲4.8292.38 ▲6.70
Add New Post /wp-admin/post-new.php1,503 ▼17918.67 ▼0.11377.40 ▲14.09109.75 ▲4.26
Media Library /wp-admin/upload.php1,815 ▲85.03 ▼0.03146.43 ▲3.54116.54 ▼14.71
htaccess Control /wp-admin/options-general.php?page=wp-htaccess-control/wp-htaccess-control.php2,7762.6859.43132.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/wp-htaccess-control/wp-htaccess-control.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; WPhtc has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 1 option
    • WPhtc_data

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp-htaccess-control/wp-htaccess-control.php
    • > Deprecated in wp-content/plugins/wp-htaccess-control/wp-htaccess-control.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; WPhtc has a deprecated constructor

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-htaccess-control/index.php
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/wp-htaccess-control/admin-ui-includes/htaccess-suggestions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/wp-htaccess-control/admin-ui-includes/custom-author-permalink.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/wp-htaccess-control/admin-ui-includes/custom-search-permalink.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/wp-htaccess-control/admin-ui-includes/custom-pagination-permalink.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/wp-htaccess-control/admin-ui-includes/custom-htaccess.php:6
    • > PHP Notice
      Trying to get property 'plugin_url' of non-object in wp-content/plugins/wp-htaccess-control/admin-ui-includes/sidebar.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-htaccess-control/wp-htaccess-control.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-htaccess-control/wp-htaccess-control-ui.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/wp-htaccess-control/admin-ui-includes/maintenance-mode.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/wp-htaccess-control/admin-ui-includes/remove-bases.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wp-htaccess-control/wp-htaccess-control.php
    • > Network (severe)
    wp-admin/images/menu-bits.gif - 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

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: You are using too many tags: 13 tag instead of maximum 10
  • Screenshots: Screenshot #1 (Administration page (as of v.2.0)) image missing
Please take inspiration from this readme.txt

wp-htaccess-control/wp-htaccess-control.php Passed 13 tests

The entry point to "WP htaccess Control" version 3.5.1 is a PHP file that has certain tags in its header comment area
123 characters long description:
Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by WordPress.

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
Good job! No executable or dangerous file extensions detected1,927 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP151391221,480
PO File192109193
Sass1170110
CSS1230108
JavaScript11036

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity136.00
▷ Minimum class complexity136.00
▷ Maximum class complexity136.00
Average method complexity6.19
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods311.54%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 compressed PNG files occupy 0.20MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png204.59KB204.19KB0.20%
images/antonioandra.de_favicon.png0.68KB0.76KB0.00%