84% open-ai-search-bar

Code Review | AI Search Bar

WordPress plugin AI Search Bar scored84%from 54 tests.

About plugin

  • Plugin page: open-ai-search-bar
  • Plugin version: 1.2
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: May 10, 2023
  • Latest release: Oct 3, 2023
  • Number of updates: 9
  • Update frequency: every 16.2 days
  • Top authors: vimakava (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /686 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.95ms] Passed 4 tests

Analyzing server-side resources used by AI Search Bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0739.86 ▲2.37
Dashboard /wp-admin3.37 ▲0.0249.10 ▼14.50
Posts /wp-admin/edit.php3.49 ▲0.1345.44 ▼10.12
Add New Post /wp-admin/post-new.php5.98 ▲0.0897.56 ▲2.44
Media Library /wp-admin/upload.php3.30 ▲0.0636.96 ▲3.33
Documentation /wp-admin/admin.php?page=documentation3.2633.29
AI Search Bar /wp-admin/admin.php?page=ai_search_bar3.2637.59

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for AI Search Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲20115.87 ▲1.2830.31 ▲28.6236.34 ▼8.19
Dashboard /wp-admin2,228 ▲545.68 ▲0.1488.54 ▼8.1538.30 ▼3.49
Posts /wp-admin/edit.php2,130 ▲302.05 ▲0.0036.60 ▼3.8534.86 ▼2.51
Add New Post /wp-admin/post-new.php1,552 ▲423.29 ▼0.01629.25 ▼14.4468.65 ▲17.42
Media Library /wp-admin/upload.php1,430 ▲274.29 ▲0.04100.59 ▲0.6943.73 ▼1.84
Documentation /wp-admin/admin.php?page=documentation9562.0327.8442.15
AI Search Bar /wp-admin/admin.php?page=ai_search_bar8932.0323.8938.16

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/open-ai-search-bar/includes/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/open-ai-search-bar/includes/utils.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: The official readme.txt might help

open-ai-search-bar/ai_search_bar.php 92% from 13 tests

The primary PHP file in "AI Search Bar" version 1.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("open-ai-search-bar.php" instead of "ai_search_bar.php")

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
No dangerous file extensions were detected14,502 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript79781,02613,845
CSS34939356
PHP65361301

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/uploads/logo-black-text.png47.92KB19.92KB▼ 58.44%
assets/uploads/check-mark.png2.53KB1.70KB▼ 32.52%