10% searchrelevance

Code Review | Search Relevance

WordPress plugin Search Relevance scored 10% from 54 tests.

About plugin

  • Plugin page: searchrelevance
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-3.6.1
  • WordPress version: 5.8.1
  • First release: Aug 19, 2013
  • Latest release: Sep 23, 2013
  • Number of updates: 9
  • Update frequency: every 3.8 days
  • Top authors: sablednah (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 2,966 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/searchrelevance/SearchRelevance.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; ssrch_class has a deprecated constructor

Server metrics [RAM: ▼1.75MB] [CPU: ▼220.93ms] Passed 4 tests

This is a short check of server-side resources used by Search Relevance
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.88 ▼0.845.09 ▼14.56
Dashboard /wp-admin1.90 ▼1.165.85 ▼49.30
Posts /wp-admin/edit.php1.90 ▼1.215.30 ▼41.46
Add New Post /wp-admin/post-new.php1.90 ▼3.538.31 ▼759.13
Media Library /wp-admin/upload.php1.90 ▼1.115.61 ▼33.81
Search Relevance /wp-admin/options-general.php?page=ssrch1.905.87

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Search Relevance
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲4715.89 ▲0.0610.26 ▲0.0850.81 ▲0.06
Dashboard /wp-admin2,972 ▲815.86 ▲0.02141.12 ▲2.60115.58 ▼7.11
Posts /wp-admin/edit.php2,744 ▲52.69 ▲0.0172.25 ▲3.3896.49 ▲6.49
Add New Post /wp-admin/post-new.php1,686 ▲318.77 ▼0.05394.36 ▲15.63112.88 ▼3.54
Media Library /wp-admin/upload.php1,812 ▲25.04 ▲0.03153.36 ▼0.64118.22 ▼14.97
Search Relevance /wp-admin/options-general.php?page=ssrch1,0962.0958.3290.30

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
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/searchrelevance/SearchRelevance.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; ssrch_class has a deprecated constructor

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ssrch
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/searchrelevance/SearchRelevance.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; ssrch_class has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=ssrch
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=ssrch
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/searchrelevance/SearchRelevance.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: relevance, search, relevanssi, wp-search, relavence...

searchrelevance/SearchRelevance.php 92% from 13 tests

The main PHP file in "Search Relevance" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("searchrelevance.php" instead of "SearchRelevance.php")

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
Everything looks great! No dangerous files found in this plugin358 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12554358

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin