83% wp-htaccess-optimize

Code Review | WP htaccess Optimize (beta)

WordPress plugin WP htaccess Optimize (beta) scored83%from 54 tests.

About plugin

  • Plugin page: wp-htaccess-optimize
  • Plugin version: 0.1.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 11, 2018
  • Latest release: Mar 30, 2019
  • Number of updates: 11
  • Update frequency: every 32.2 days
  • Top authors: florianluce (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,711 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.23ms] Passed 4 tests

This is a short check of server-side resources used by WP htaccess Optimize (beta)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.09 ▼1.76
Dashboard /wp-admin3.33 ▼0.0252.23 ▼13.86
Posts /wp-admin/edit.php3.38 ▲0.0248.87 ▼0.69
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.99 ▼16.61
Media Library /wp-admin/upload.php3.25 ▲0.0237.84 ▲1.03
WP htaccess Optimize /wp-admin/options-general.php?page=wpho-theme-htaccess-menu3.2239.71

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP htaccess Optimize (beta)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.28 ▼0.101.94 ▲0.1344.82 ▲1.21
Dashboard /wp-admin2,202 ▲225.59 ▼0.0888.08 ▼11.2239.59 ▼3.51
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0241.29 ▲4.8435.24 ▼1.38
Add New Post /wp-admin/post-new.php1,540 ▲1423.13 ▼0.17671.76 ▼46.6074.07 ▲11.54
Media Library /wp-admin/upload.php1,401 ▼24.18 ▼0.0199.75 ▲0.1146.43 ▲2.17
WP htaccess Optimize /wp-admin/options-general.php?page=wpho-theme-htaccess-menu1,0882.0024.2329.57

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-htaccess-optimize/wp-htaccess-optimize-admin-ui.php:242
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-htaccess-optimize/wp-htaccess-optimize-htaccess-generator.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-htaccess-optimize/wp-htaccess-optimize-admin-ui.php:242

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 75% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2 in wp-htaccess-optimize/assets to your readme.txt
  • Requires php: Invalid plugin version format
  • Tags: You are using too many tags: 14 tag instead of maximum 10
  • Requires at least: Invalid plugin version format
You can take inspiration from this readme.txt

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

"WP htaccess Optimize (beta)" version 0.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
53 characters long description:
simply configure your htaccess to optimize your site!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected661 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4129112661

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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 functions2589.29%
▷ Anonymous functions310.71%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin