78% wp-autosearch

Code Review | WP AutoComplete Search

WordPress plugin WP AutoComplete Search scored 78% from 54 tests.

About plugin

  • Plugin page: wp-autosearch
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.0
  • WordPress version: 5.9.2
  • First release: Oct 31, 2016
  • Latest release: Aug 13, 2020
  • Number of updates: 15
  • Update frequency: every 91.7 days
  • Top authors: netflixtechweb (86.67%)Otto42 (20%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active / 19,793 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 gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▼310.89ms] Passed 4 tests

Server-side resources used by WP AutoComplete Search
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.2757.80 ▲7.43
Dashboard /wp-admin3.63 ▲0.2135.31 ▲1.69
Posts /wp-admin/edit.php3.85 ▲0.2139.40 ▲1.48
Add New Post /wp-admin/post-new.php7.09 ▲0.1293.54 ▼1,246.61
Media Library /wp-admin/upload.php3.51 ▲0.2126.64 ▼0.13
WP AutoSearch /wp-admin/options-general.php?page=wp_autosearch_options3.8024.78

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 2 new options
New WordPress options
widget_wizardinfosys_autosearch
wp-autosearch-suggest

Browser metrics Passed 4 tests

An overview of browser requirements for WP AutoComplete Search
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,924 ▲17016.40 ▲0.7711.87 ▲5.412.94 ▲0.21
Dashboard /wp-admin2,893 ▲326.17 ▲0.01122.26 ▼11.26160.24 ▼6.49
Posts /wp-admin/edit.php2,693 ▼13.24 ▲0.0065.10 ▼0.77144.53 ▼0.28
Add New Post /wp-admin/post-new.php1,755 ▲9420.92 ▲5.34458.37 ▼4.16172.04 ▲1.76
Media Library /wp-admin/upload.php1,700 ▲25.55 ▲0.07146.29 ▲7.62195.58 ▲7.40
WP AutoSearch /wp-admin/options-general.php?page=wp_autosearch_options2,7602.9768.11147.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • wp-autosearch-suggest
    • widget_wizardinfosys_autosearch

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-autosearch/widget/widget.php
    • > /wp-content/plugins/wp-autosearch/functions.php
    • > /wp-content/plugins/wp-autosearch/helper/options.php
    • > /wp-content/plugins/wp-autosearch/helper/helper.php
    • > /wp-content/plugins/wp-autosearch/ajax/ajax.php
    • > /wp-content/plugins/wp-autosearch/assert/css/style.php
  • 69× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'results_even_bar' of non-object in wp-content/plugins/wp-autosearch/assert/css/style.php on line 122
    • > PHP Notice
      Trying to get property 'box_border' of non-object in wp-content/plugins/wp-autosearch/assert/css/style.php on line 19
    • > PHP Notice
      Trying to get property 'url' of non-object in wp-content/plugins/wp-autosearch/assert/css/style.php on line 65
    • > PHP Notice
      Trying to get property 'options' of non-object in wp-content/plugins/wp-autosearch/assert/css/style.php on line 63
    • > PHP Notice
      Trying to get property 'options' of non-object in wp-content/plugins/wp-autosearch/assert/css/style.php on line 64
    • > PHP Notice
      Trying to get property 'box_background' of non-object in wp-content/plugins/wp-autosearch/assert/css/style.php on line 181
    • > PHP Notice
      Trying to get property 'url' of non-object in wp-content/plugins/wp-autosearch/assert/css/style.php on line 85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-autosearch/media/resize.php:345
    • > PHP Notice
      Trying to get property 'options' of non-object in wp-content/plugins/wp-autosearch/assert/css/style.php on line 162
    • > PHP Notice
      Trying to get property 'results_odd_text' of non-object in wp-content/plugins/wp-autosearch/assert/css/style.php on line 42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #7, #8, #9 in wp-autosearch/assets to your readme.txt
The official readme.txt is a good inspiration

wp-autosearch/wp-autosearch.php Passed 13 tests

The principal PHP file in "WP AutoComplete Search" v. 1.0.4 is loaded by WordPress automatically on each request
110 characters long description:
Wordpress realtime auto search suggestions of WordPress posts, pages,custom post,taxonomies and Order of Types

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
Everything looks great! No dangerous files found in this plugin5,082 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript72452171,722
PHP84123871,704
CSS1195571,268
PO File2174348388

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.67
▷ Minimum class complexity5.00
▷ Maximum class complexity19.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
21 PNG files occupy 0.54MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshots/screenshot-2.png55.86KB16.42KB▼ 70.60%
assets/screenshots/screenshot-4.png78.63KB23.05KB▼ 70.69%
assert/js/jscolor/hs.png2.62KB7.54KB0.00%
assets/screenshots/screenshot-1.png149.83KB39.39KB▼ 73.71%
assert/css/icons/wp-stat.png1.87KB1.00KB▼ 46.65%