84% wp-search-with-algolia

Code Review | WP Search with Algolia

WordPress plugin WP Search with Algolia scored84%from 54 tests.

About plugin

  • Plugin page: wp-search-with-al...
  • Plugin version: 2.7.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 16, 2019
  • Latest release: Dec 1, 2023
  • Number of updates: 48
  • Update frequency: every 34.6 days
  • Top authors: webdevstudios (35.42%)richaber (31.25%)mrasharirfan (22.92%)gregrickaby (14.58%)tw2113 (4.17%)

Code review

54 tests

User reviews

18 reviews

Install metrics

6,000+ active /141,302 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.79MB] [CPU: ▼0.42ms] Passed 4 tests

This is a short check of server-side resources used by WP Search with Algolia
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.11 ▲0.6439.63 ▼1.97
Dashboard /wp-admin4.18 ▲0.8851.83 ▲4.17
Posts /wp-admin/edit.php4.23 ▲0.8851.22 ▲1.91
Add New Post /wp-admin/post-new.php6.72 ▲0.8395.68 ▼5.79
Media Library /wp-admin/upload.php4.04 ▲0.8141.70 ▲6.30

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 959 new files
Database: no new tables, 16 new options
New WordPress options

Browser metrics Passed 4 tests

WP Search with Algolia: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6814.31 ▲0.041.58 ▼0.5637.67 ▼7.75
Dashboard /wp-admin2,235 ▲555.75 ▲0.1898.07 ▲11.8042.86 ▲2.95
Posts /wp-admin/edit.php2,147 ▲472.24 ▲0.2938.85 ▼1.1133.83 ▲0.69
Add New Post /wp-admin/post-new.php1,544 ▲1823.40 ▲0.09614.68 ▲15.1351.74 ▲9.31
Media Library /wp-admin/upload.php1,440 ▲404.16 ▼0.0698.96 ▲1.2141.80 ▼0.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 16 options
    • algolia_autocomplete_config
    • algolia_api_is_reachable
    • algolia_synced_indices_ids
    • widget_recent-comments
    • can_compress_scripts
    • algolia_index_name_prefix
    • widget_theysaidso_widget
    • db_upgraded
    • algolia_search_api_key
    • algolia_powered_by_enabled
    • ...

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
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 items
  • 65× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WebDevStudios\\WPSWA\\Algolia\\AlgoliaSearch\\Response\\AbstractResponse' not found in wp-content/plugins/wp-search-with-algolia/vendor_prefixed/algolia/algoliasearch-client-php/src/Response/MultiResponse.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'WebDevStudios\\WPSWA\\Psr\\SimpleCache\\CacheInterface' not found in wp-content/plugins/wp-search-with-algolia/vendor_prefixed/algolia/algoliasearch-client-php/src/Cache/NullCacheDriver.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'WebDevStudios\\WPSWA\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-search-with-algolia/vendor_prefixed/algolia/algoliasearch-client-php/src/Http/Psr7/BufferStream.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WebDevStudios\\WPSWA\\Algolia\\AlgoliaSearch\\Exceptions\\AlgoliaException' not found in wp-content/plugins/wp-search-with-algolia/vendor_prefixed/algolia/algoliasearch-client-php/src/Exceptions/MissingObjectId.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WebDevStudios\\WPSWA\\Algolia\\AlgoliaSearch\\Config\\AbstractConfig' not found in wp-content/plugins/wp-search-with-algolia/vendor_prefixed/algolia/algoliasearch-client-php/src/Config/AnalyticsConfig.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WebDevStudios\\WPSWA\\Psr\\Log\\AbstractLogger' not found in wp-content/plugins/wp-search-with-algolia/vendor_prefixed/psr/log/Psr/Log/Test/TestLogger.php:63
    • > PHP Fatal error
      Uncaught Error: Class 'WebDevStudios\\WPSWA\\Algolia\\AlgoliaSearch\\Config\\AbstractConfig' not found in wp-content/plugins/wp-search-with-algolia/vendor_prefixed/algolia/algoliasearch-client-php/src/Config/PlacesConfig.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WebDevStudios\\WPSWA\\Algolia\\AlgoliaSearch\\Iterators\\AbstractAlgoliaIterator' not found in wp-content/plugins/wp-search-with-algolia/vendor_prefixed/algolia/algoliasearch-client-php/src/Iterators/RuleIterator.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'WebDevStudios\\WPSWA\\Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/wp-search-with-algolia/vendor_prefixed/psr/http-message/src/ServerRequestInterface.php:49
    • > PHP Fatal error
      Uncaught Error: Class 'WebDevStudios\\WPSWA\\Algolia\\AlgoliaSearch\\Exceptions\\RequestException' not found in wp-content/plugins/wp-search-with-algolia/vendor_prefixed/algolia/algoliasearch-client-php/src/Exceptions/RetriableException.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-search-with-algolia/algolia.php 92% from 13 tests

"WP Search with Algolia" version 2.7.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-search-with-algolia.php" instead of "algolia.php")

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
Good job! No executable or dangerous file extensions detected85,036 lines of code in 900 files:
LanguageFilesBlank linesComment linesLines of code
PO File181105333
Bourne Shell212054

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.21
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
▷ Abstract classes65.77%
▷ Concrete classes9894.23%
▷ Final classes5152.04%
▷ Static methods10411.13%
▷ Public methods81387.04%
▷ Protected methods475.03%
▷ Private methods747.92%
▷ Named functions823.53%
▷ Anonymous functions2676.47%
▷ Global constants622.22%
▷ Class constants2177.78%
▷ Public constants21100.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
There are no PNG files in this plugin