84% yext-ai-search

Code Review | Yext AI Search

WordPress plugin Yext AI Search scored84%from 54 tests.

About plugin

  • Plugin page: yext-ai-search
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Feb 17, 2022
  • Latest release: Oct 19, 2023
  • Number of updates: 10
  • Update frequency: every 61.0 days
  • Top authors: yext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,953 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.69MB] [CPU: ▲1.62ms] Passed 4 tests

Server-side resources used by Yext AI Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6647.34 ▲8.87
Dashboard /wp-admin4.01 ▲0.7049.71 ▲3.00
Posts /wp-admin/edit.php4.06 ▲0.7051.92 ▲4.53
Add New Post /wp-admin/post-new.php6.65 ▲0.7687.26 ▼9.92
Media Library /wp-admin/upload.php3.94 ▲0.7044.73 ▲9.24

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 252 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Yext AI Search
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲13214.65 ▲0.2456.03 ▲54.0639.04 ▼5.18
Dashboard /wp-admin2,278 ▲985.72 ▲0.0789.31 ▼1.3244.58 ▲4.51
Posts /wp-admin/edit.php2,185 ▲882.35 ▲0.3941.51 ▲6.7543.93 ▲11.22
Add New Post /wp-admin/post-new.php6,429 ▲4,90328.68 ▲5.66999.65 ▲292.0141.62 ▼10.94
Media Library /wp-admin/upload.php1,485 ▲854.48 ▲0.26114.71 ▲14.4656.06 ▲10.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Yext\\Admin\\Fields\\Type\\AbstractField' not found in wp-content/plugins/yext-ai-search/includes/classes/Admin/Fields/Type/HiddenField.php:15
    • > PHP Fatal error
      Trait 'Yext\\Traits\\Singleton' not found in wp-content/plugins/yext-ai-search/includes/classes/Components/SearchBar.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'Yext\\Admin\\Fields\\Type\\SelectField' not found in wp-content/plugins/yext-ai-search/includes/classes/Admin/Fields/Type/SelectPagesField.php:15
    • > PHP Fatal error
      Trait 'Yext\\Traits\\Singleton' not found in wp-content/plugins/yext-ai-search/includes/classes/Install.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yext-ai-search/includes/partials/settings.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Yext\\Templates\\AbstractTemplate' not found in wp-content/plugins/yext-ai-search/includes/classes/Templates/SearchPageTemplate.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Yext\\Admin\\Fields\\Type\\AbstractField' not found in wp-content/plugins/yext-ai-search/includes/classes/Admin/Fields/Type/ColorField.php:15
    • > PHP Fatal error
      Trait 'Yext\\Traits\\Singleton' not found in wp-content/plugins/yext-ai-search/includes/classes/Admin/Settings.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'Yext\\Admin\\Fields\\Type\\AbstractField' not found in wp-content/plugins/yext-ai-search/includes/classes/Admin/Fields/Type/SelectField.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Yext\\Admin\\Fields\\Type\\AbstractField' not found in wp-content/plugins/yext-ai-search/includes/classes/Admin/Fields/Type/NumberField.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: search-engine, search, site-search, better-search, autocomplete...

yext-ai-search/yext-ai-search.php 85% from 13 tests

The main PHP file in "Yext AI Search" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin9,423 lines of code in 219 files:
LanguageFilesBlank linesComment linesLines of code
PHP556591,6944,004
JavaScript443777183,314
CSS53280431,329
Markdown1580281
SVG5800259
JSON500173
TypeScript35863

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.35
Average class complexity9.70
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces16
Interfaces0
Traits1
Classes22
▷ Abstract classes29.09%
▷ Concrete classes2090.91%
▷ Final classes735.00%
Methods137
▷ Static methods3223.36%
▷ Public methods11483.21%
▷ Protected methods2014.60%
▷ Private methods32.19%
Functions46
▷ Named functions3576.09%
▷ Anonymous functions1123.91%
Constants21
▷ Global constants523.81%
▷ Class constants1676.19%
▷ Public constants16100.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
12 compressed PNG files occupy 0.20MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/images/logos/marstons.png2.58KB2.68KB0.00%
assets/images/logos/samsung.png5.38KB3.43KB▼ 36.20%
assets/images/logos/fazolis.png6.69KB6.68KB0.07%
dist/images/logos/fazolis.png6.66KB6.66KB0.07%
assets/images/logos/cox.png8.74KB8.48KB▼ 2.97%