84% hk-filter-and-search

Code Review | HTML filter and csv-file search

WordPress plugin HTML filter and csv-file search scored84%from 54 tests.

About plugin

  • Plugin page: hk-filter-and-search
  • Plugin version: 2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 9, 2016
  • Latest release: Aug 23, 2023
  • Number of updates: 32
  • Update frequency: every 80.4 days
  • Top authors: jonas.hjalmarsson (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /3,998 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.00ms] Passed 4 tests

This is a short check of server-side resources used by HTML filter and csv-file search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.29 ▼8.59
Dashboard /wp-admin3.36 ▲0.0549.36 ▼4.44
Posts /wp-admin/edit.php3.41 ▲0.0547.78 ▲2.85
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.15 ▼13.83
Media Library /wp-admin/upload.php3.28 ▲0.0540.24 ▲4.95

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: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for HTML filter and csv-file search
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲13313.57 ▼0.807.12 ▲5.1243.13 ▼0.74
Dashboard /wp-admin2,206 ▲184.87 ▼0.99103.58 ▼4.6945.45 ▲3.10
Posts /wp-admin/edit.php2,089 ▲32.06 ▲0.0537.43 ▲1.3135.36 ▼1.86
Add New Post /wp-admin/post-new.php1,519 ▼023.19 ▼0.23670.64 ▼35.2452.20 ▼3.74
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.05100.97 ▼9.0247.07 ▲3.37

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function hk_filter_and_search\\add_action() in wp-content/plugins/hk-filter-and-search/hk-filter-and-search.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 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: search, jquery, excel, filter, csv

hk-filter-and-search/hk-filter-and-search.php Passed 13 tests

Analyzing the main PHP file in "HTML filter and csv-file search" version 2.7
133 characters long description:
Easy way to enable jquery HTML filter or a CSV-file-search to a webpage. Use the shortcodes [csvsearch] and [filtersearch] to enable.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin407 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18170407

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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
Namespaces1
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin