79% relevanssi-live-ajax-search

Code Review | Relevanssi Live Ajax Search

WordPress plugin Relevanssi Live Ajax Search scored79%from 54 tests.

About plugin

  • Plugin page: relevanssi-live-a...
  • Plugin version: 2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Jan 25, 2022
  • Latest release: Nov 8, 2023
  • Number of updates: 20
  • Update frequency: every 32.6 days
  • Top authors: msaari (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

3,000+ active /23,654 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.03MB] [CPU: ▼7.37ms] Passed 4 tests

Server-side resources used by Relevanssi Live Ajax Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.09 ▼3.50
Dashboard /wp-admin3.35 ▲0.0048.68 ▼16.01
Posts /wp-admin/edit.php3.40 ▲0.0446.23 ▼4.90
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.35 ▼5.07
Media Library /wp-admin/upload.php3.27 ▲0.0436.30 ▲3.34

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Relevanssi Live Ajax Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,022 ▲26013.41 ▼0.9313.80 ▲12.0638.19 ▼9.44
Dashboard /wp-admin2,195 ▲215.60 ▼0.0292.32 ▼7.3040.24 ▼6.02
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0636.73 ▼0.6632.98 ▼1.41
Add New Post /wp-admin/post-new.php1,535 ▲925.12 ▲2.04650.83 ▼28.2163.40 ▲10.01
Media Library /wp-admin/upload.php1,400 ▼34.20 ▼0.0799.55 ▼0.0244.10 ▼1.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/relevanssi-live-ajax-search/templates/search-results-messages.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/relevanssi-live-ajax-search/templates/search-results-query.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/relevanssi-live-ajax-search/templates/search-results.php:25

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: live, ajax, search

relevanssi-live-ajax-search/relevanssi-live-ajax-search.php Passed 13 tests

This is the main PHP file of "Relevanssi Live Ajax Search" version 2.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
43 characters long description:
Enhance your search forms with live search.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,554 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3140134932
PHP11111499415
Sass1191130
CSS19377

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.75
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1688.89%
▷ Protected methods00.00%
▷ Private methods211.11%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin