79% acf-better-search

Code Review | ACF: Better Search

WordPress plugin ACF: Better Search scored79%from 54 tests.

About plugin

  • Plugin page: acf-better-search
  • Plugin version: 4.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 18, 2016
  • Latest release: Sep 27, 2023
  • Number of updates: 146
  • Update frequency: every 16.9 days
  • Top authors: mateuszgbiorczyk (100%)

Code review

54 tests

User reviews

145 reviews

Install metrics

40,000+ active /499,351 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼1.72ms] Passed 4 tests

An overview of server-side resources used by ACF: Better Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3145.16 ▲3.09
Dashboard /wp-admin3.61 ▲0.3154.38 ▲0.01
Posts /wp-admin/edit.php3.66 ▲0.3051.95 ▲2.27
Add New Post /wp-admin/post-new.php6.21 ▲0.3291.88 ▼12.26
Media Library /wp-admin/upload.php3.53 ▲0.3043.77 ▲5.54
ACF: Better Search /wp-admin/options-general.php?page=acfbs_admin_page3.4642.44

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
acfbs_notice_hidden
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
acfbs_notice_converter
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by ACF: Better Search
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲6413.30 ▼1.354.95 ▲2.8928.75 ▼18.25
Dashboard /wp-admin2,241 ▲504.93 ▲0.03103.03 ▼0.5045.76 ▲2.41
Posts /wp-admin/edit.php2,113 ▲272.07 ▲0.0438.51 ▲0.1939.53 ▲8.52
Add New Post /wp-admin/post-new.php1,537 ▲1823.28 ▲0.25683.20 ▼8.3558.65 ▲3.59
Media Library /wp-admin/upload.php1,412 ▲244.38 ▲0.26109.46 ▼6.4548.65 ▼1.50
ACF: Better Search /wp-admin/options-general.php?page=acfbs_admin_page1,1061.7625.8440.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/acf-better-search/templates/components/settings/fields.php
    • > /wp-content/plugins/acf-better-search/templates/components/settings/features.php
  • 29× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfBetterSearch\\HookableInterface' not found in wp-content/plugins/acf-better-search/src/Settings/Page.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfBetterSearch\\HookableInterface' not found in wp-content/plugins/acf-better-search/src/Search/Request.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfBetterSearch\\HookableInterface' not found in wp-content/plugins/acf-better-search/src/Search/Query.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/acf-better-search/templates/components/notices/thanks.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'AcfBetterSearch\otice\oticeAbstract' not found in wp-content/plugins/acf-better-search/src/Notice/AcfRequiredNotice.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfBetterSearch\\HookableInterface' not found in wp-content/plugins/acf-better-search/src/Admin/Plugin.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfBetterSearch\\HookableInterface' not found in wp-content/plugins/acf-better-search/src/Notice/NoticeIntegration.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/acf-better-search/templates/components/widgets/settings.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'AcfBetterSearch\otice\oticeAbstract' not found in wp-content/plugins/acf-better-search/src/Notice/ThanksNotice.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfBetterSearch\\HookableInterface' not found in wp-content/plugins/acf-better-search/src/Admin/Install.php:14

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)
Everything seems fine on the user side

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: advanced custom fields, extended search, acf search, better search, search

acf-better-search/acf-better-search.php Passed 13 tests

The main PHP script in "ACF: Better Search" version 4.2.0 is automatically included on every request by WordPress
127 characters long description:
Adds to default WordPress search engine the ability to search by content from selected fields of Advanced Custom Fields plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,760 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP433978931,753
JSON1005
CSS1001
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity6.96
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces2
Traits0
Classes26
▷ Abstract classes13.85%
▷ Concrete classes2596.15%
▷ Final classes00.00%
Methods143
▷ Static methods2517.48%
▷ Public methods12587.41%
▷ Protected methods00.00%
▷ Private methods1812.59%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.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