10% searchiq

Code Review | SearchIQ - The Search Solution

WordPress plugin SearchIQ - The Search Solution scored10%from 54 tests.

About plugin

  • Plugin page: searchiq
  • Plugin version: 4.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.4
  • WordPress version: 6.3.1
  • First release: Feb 9, 2016
  • Latest release: Nov 23, 2023
  • Number of updates: 146
  • Update frequency: every 19.5 days
  • Top authors: searchiq (100%)

Code review

54 tests

User reviews

182 reviews

Install metrics

2,000+ active /75,646 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/searchiq/library/plugin.php+1166
    Undefined index: custom_search_page

Server metrics [RAM: ▲1.79MB] [CPU: ▲7.52ms] Passed 4 tests

Server-side resources used by SearchIQ - The Search Solution
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.30 ▲1.8356.93 ▲16.45
Dashboard /wp-admin5.13 ▲1.7859.51 ▼8.34
Posts /wp-admin/edit.php5.18 ▲1.8263.93 ▲16.84
Add New Post /wp-admin/post-new.php7.68 ▲1.79100.47 ▲5.13
Media Library /wp-admin/upload.php4.99 ▲1.7652.05 ▲17.08

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 69 new files
Database: 2 new tables, 11 new options
New tables
wp_siq_errors
wp_siq_sync
New WordPress options
widget_recent-posts
_siq_plugin_version
theysaidso_admin_options
_siq_custom_search_page
siq_db_version
_siq_activated
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_siq_search_widget
...

Browser metrics Passed 4 tests

SearchIQ - The Search Solution: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7714.25 ▲0.091.76 ▲0.0741.34 ▼1.45
Dashboard /wp-admin2,206 ▲325.59 ▲0.0291.95 ▲0.9073.63 ▲33.96
Posts /wp-admin/edit.php2,126 ▲261.97 ▲0.0338.43 ▲0.7335.01 ▼0.26
Add New Post /wp-admin/post-new.php1,701 ▲17221.79 ▼1.41662.45 ▲60.2052.37 ▼6.75
Media Library /wp-admin/upload.php1,423 ▲234.22 ▼0.0392.45 ▼1.6176.89 ▲36.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_siq_errors
    • wp_siq_sync
  • Zombie WordPress options were found after uninstall: 11 options
    • widget_recent-comments
    • siq_db_version
    • _siq_activated
    • _siq_plugin_version
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • _siq_custom_search_page
    • widget_siq_search_widget
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/searchiq/library/widget-search.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/searchiq/templates/backend/error-log.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/searchiq/library/widget-search.php:32

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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

searchiq/searchiq.php Passed 13 tests

The principal PHP file in "SearchIQ - The Search Solution" v. 4.5 is loaded by WordPress automatically on each request
96 characters long description:
SearchIQ replaces default WordPress search and offers fast, relevant and a better search engine.

Code Analysis 95% from 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 detected12,833 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP167671199,258
JavaScript3292492,525
CSS49041,039
SVG10011

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,027)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 133)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity267.86
▷ Minimum class complexity3.00
▷ Maximum class complexity1,027.00
Average method complexity6.20
▷ Minimum method complexity1.00
▷ Maximum method complexity133.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods357
▷ Static methods92.52%
▷ Public methods21961.34%
▷ Protected methods7420.73%
▷ Private methods6417.93%
Functions10
▷ Named functions00.00%
▷ Anonymous functions10100.00%
Constants39
▷ Global constants1128.21%
▷ Class constants2871.79%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
28 PNG files occupy 0.40MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/4.5/images/search-bg.png1.26KB0.52KB▼ 58.34%
assets/4.5/images/top-arrow.png1.07KB0.17KB▼ 83.65%
assets/4.5/images/loading.png0.47KB0.39KB▼ 17.63%
assets/4.5/images/tag-16.png1.10KB0.31KB▼ 72.09%
assets/4.5/jscolor/hv.png2.80KB7.32KB0.00%