84% woo-autocomplete-search-bar

Code Review | Woo Autocomplete Search Bar

WordPress plugin Woo Autocomplete Search Bar scored84%from 54 tests.

About plugin

  • Plugin page: woo-autocomplete-...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2016
  • Latest release: Jun 15, 2023
  • Number of updates: 43
  • Update frequency: every 61.7 days
  • Top authors: run-man (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /9,923 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.68ms] Passed 4 tests

An overview of server-side resources used by Woo Autocomplete Search Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0745.54 ▲2.88
Dashboard /wp-admin3.38 ▲0.0448.75 ▼13.00
Posts /wp-admin/edit.php3.50 ▲0.1452.22 ▲6.50
Add New Post /wp-admin/post-new.php5.96 ▲0.0888.71 ▼10.00
Media Library /wp-admin/upload.php3.31 ▲0.0838.48 ▲1.42

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
widget_autocomplete

Browser metrics Passed 4 tests

A check of browser resources used by Woo Autocomplete Search Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.29 ▼0.3510.10 ▲8.1635.47 ▼5.33
Dashboard /wp-admin2,200 ▲295.65 ▲0.0182.79 ▼8.8673.93 ▲31.10
Posts /wp-admin/edit.php2,123 ▲261.97 ▼0.0037.61 ▲1.2536.10 ▲0.42
Add New Post /wp-admin/post-new.php1,544 ▲1923.09 ▲0.01737.78 ▲103.1960.43 ▼6.43
Media Library /wp-admin/upload.php1,420 ▲264.22 ▲0.01101.15 ▲2.9970.87 ▲28.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_autocomplete
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woo-autocomplete-search-bar/woo-autocomplete-search-bar.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === woo-autocomplete-search-bar === )
You can look at the official readme.txt

woo-autocomplete-search-bar/woo-autocomplete-search-bar.php Passed 13 tests

"Woo Autocomplete Search Bar" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
133 characters long description:
This plugin gives visitors an autocomplete search bar of all published WooCommerce products and/or categories via shortcode or widget

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin349 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP159103342
CSS2007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/woo_autocomplete.png1.61KB1.38KB▼ 13.80%