73% wp-ultimate-search

Code Review | WP Ultimate Search

WordPress plugin WP Ultimate Search scored 73% from 54 tests.

About plugin

  • Plugin page: wp-ultimate-search
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 5.8.1
  • First release: Aug 1, 2012
  • Latest release: Aug 28, 2015
  • Number of updates: 66
  • Update frequency: every 17.0 days
  • Top authors: sekatsim (56.06%)mindshare (45.45%)

Code review

54 tests

User reviews

21 reviews

Install metrics

1,000+ active / 57,242 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.47MB] [CPU: ▼139.78ms] Passed 4 tests

This is a short check of server-side resources used by WP Ultimate Search
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.99 ▲0.2735.38 ▲13.99
Dashboard /wp-admin3.62 ▲0.5748.92 ▲9.78
Posts /wp-admin/edit.php3.67 ▲0.5646.12 ▲2.14
Add New Post /wp-admin/post-new.php5.92 ▲0.4997.68 ▼569.51
Media Library /wp-admin/upload.php3.56 ▲0.5638.06 ▼1.51
WP Ultimate Search /wp-admin/options-general.php?page=wpus-options3.3926.60

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 67 new files
Database: no new tables, 2 new options
New WordPress options
widget_wp_ultimate_search_widget
wpus_options

Browser metrics Passed 4 tests

WP Ultimate Search: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,936 ▲34017.52 ▲2.2032.63 ▲24.5345.88 ▼3.13
Dashboard /wp-admin2,975 ▲415.90 ▼0.06130.83 ▼12.18106.07 ▼4.06
Posts /wp-admin/edit.php2,744 ▲52.69 ▲0.0067.21 ▲3.6881.14 ▼4.39
Add New Post /wp-admin/post-new.php1,875 ▲319.02 ▼0.30356.63 ▼11.04106.84 ▼9.90
Media Library /wp-admin/upload.php1,815 ▲84.99 ▼0.03159.20 ▲6.23118.80 ▼1.72
WP Ultimate Search /wp-admin/options-general.php?page=wpus-options2,4374.1183.0399.63

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
  • Zombie WordPress options were found after uninstall: 2 options
    • wpus_options
    • widget_wp_ultimate_search_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wpus-options
    • > User notice in wp-includes/functions.php+5663
    WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpus-options
    • > Notice in wp-content/plugins/wp-ultimate-search/views/wpus-options.php+463
    Trying to access array offset on value of type int
    • > GET request to /wp-admin/options-general.php?page=wpus-options
    • > Notice in wp-content/plugins/wp-ultimate-search/lib/options/options.php+1528
    Undefined index: reset

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: wpus_results in wp-content/plugins/wp-ultimate-search/views/wpus-results-template-images.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/wp-ultimate-search/views/wpus-results-template-titles.php:1
    • > PHP Notice
      Undefined variable: wpus_results in wp-content/plugins/wp-ultimate-search/views/wpus-results-template-titles.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'WPUS_options' not found in wp-content/plugins/wp-ultimate-search/views/wpus-options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/wp-ultimate-search/views/wpus-results-template.php:1
    • > PHP Notice
      Undefined variable: wpus_results in wp-content/plugins/wp-ultimate-search/views/wpus-results-template.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/wp-ultimate-search/views/wpus-results-template-images.php:1
    • > PHP Notice
      Undefined variable: wpus_results in wp-content/plugins/wp-ultimate-search/views/wpus-results-template-thumbnail.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-ultimate-search/views/wpus-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/wp-ultimate-search/views/wpus-results-template-thumbnail.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=wpus-options
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'mozilla')" "TypeError: Cannot read properties of undefined (reading 'mozilla')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-ultimate-search/js/wpus-main-admin.js?ver=5.8.1:41:16)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=wpus-options
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught TypeError: Cannot read properties of undefined (reading 'mozilla')

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
These attributes need to be fixed:
  • Tags: Too many tags (23 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

wp-ultimate-search/wp-ultimate-search.php Passed 13 tests

The main PHP file in "WP Ultimate Search" ver. 2.0.3 adds more information about the plugin and also serves as the entry point for this plugin
48 characters long description:
Advanced faceted AJAX search and filter utility.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected12,974 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript179886647,862
PHP97941,2432,431
CSS9160841,608
PO File2166170465
SVG100414
Markdown2370194

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity62.67
▷ Minimum class complexity4.00
▷ Maximum class complexity166.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods126
▷ Static methods00.00%
▷ Public methods6249.21%
▷ Protected methods53.97%
▷ Private methods5946.83%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.37MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/tick.png0.52KB0.52KB0.00%
img/icons.png1.80KB0.63KB▼ 64.84%
img/embed/icons/cancel_search.png0.53KB0.33KB▼ 36.97%
img/embed/icons/icons.png1.80KB0.63KB▼ 64.84%
lib/options/lib/bootstrap-formhelpers/bootstrap-formhelpers-countries.flags.png56.36KB20.36KB▼ 63.87%