62% add-search-to-menu

Code Review | Ivory Search - WordPress Search Plugin

WordPress plugin Ivory Search - WordPress Search Plugin scored 62% from 54 tests.

About plugin

  • Plugin page: add-search-to-menu
  • Plugin version: 5.4.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.9
  • WordPress version: 5.9.2
  • First release: Apr 6, 2017
  • Latest release: Mar 24, 2022
  • Number of updates: 119
  • Update frequency: every 15.2 days
  • Top authors: vinod dalvi (100%)

Code review

54 tests

User reviews

949 reviews

Install metrics

80,000+ active / 1,375,087 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲4.88MB] [CPU: ▼269.44ms] Passed 4 tests

A check of server-side resources used by Ivory Search - WordPress Search Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /8.31 ▲4.8080.37 ▲31.56
Dashboard /wp-admin8.33 ▲4.9266.06 ▲32.11
Posts /wp-admin/edit.php8.41 ▲4.7765.21 ▲26.67
Add New Post /wp-admin/post-new.php11.98 ▲5.02110.64 ▼1,168.10
Media Library /wp-admin/upload.php8.33 ▲5.0458.34 ▲35.15
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.3351.83
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php9.3575.68
Add New /wp-admin/admin.php?page=ivory-search-new8.3345.79

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 223 new files
Database: no new tables, 8 new options
New WordPress options
fs_debug_mode
fs_accounts
widget_is_widget
fs_active_plugins
fs_gdpr
widget_recent-comments
is_install
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Ivory Search - WordPress Search Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,955 ▲21116.25 ▲0.579.97 ▲3.582.36 ▲0.04
Dashboard /wp-admin2,930 ▲696.16 ▲0.01121.46 ▼15.81170.68 ▲11.73
Posts /wp-admin/edit.php2,743 ▲523.23 ▲0.0066.12 ▼1.16168.09 ▲18.71
Add New Post /wp-admin/post-new.php1,690 ▲2919.07 ▲2.37439.06 ▲27.54169.24 ▲15.75
Media Library /wp-admin/upload.php1,753 ▲555.52 ▲0.02145.69 ▲0.45204.01 ▲17.42
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,4532.4654.72114.59
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php7,49119.89492.59179.41
Add New /wp-admin/admin.php?page=ivory-search-new280.940.0417.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/add-search-to-menu/includes/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • fs_debug_mode
    • fs_active_plugins
    • widget_recent-posts
    • fs_accounts
    • widget_is_widget
    • fs_gdpr

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object

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 take a closer look at the following
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/add-search-to-menu/includes/class-is-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'IS_Base_Options' not found in wp-content/plugins/add-search-to-menu/includes/class-is-index-manager.php:12
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/add-search-to-menu/admin/class-is-list-table.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'IS_Base_Options' not found in wp-content/plugins/add-search-to-menu/includes/class-is-index-options.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/add-search-to-menu/admin/class-is-list-table.php on line 19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/add-search-to-menu/admin/class-is-list-table.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'Ivory_Search' not found in wp-content/plugins/add-search-to-menu/includes/class-is.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-search-to-menu/includes/class-is-customizer.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-search-to-menu/includes/compatibility/class-is-tablepress-compat.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=ivory-search-new
    • > Network (severe)
    wp-admin/admin.php?page=ivory-search-new - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
The official readme.txt is a good inspiration

add-search-to-menu/add-search-to-menu.php 92% from 13 tests

Analyzing the main PHP file in "Ivory Search - WordPress Search Plugin" version 5.4.5
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 152 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin45,573 lines of code in 173 files:
LanguageFilesBlank linesComment linesLines of code
PHP1439,11519,46042,044
CSS18338301,850
JavaScript122372921,679

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,910)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 146)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity80.80
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.95
▷ Minimum method complexity1.00
▷ Maximum method complexity146.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes75
▷ Abstract classes22.67%
▷ Concrete classes7397.33%
▷ Final classes11.37%
Methods1,520
▷ Static methods24115.86%
▷ Public methods1,14175.07%
▷ Protected methods463.03%
▷ Private methods33321.91%
Functions104
▷ Named functions9894.23%
▷ Anonymous functions65.77%
Constants158
▷ Global constants10667.09%
▷ Class constants5232.91%
▷ Public constants52100.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
7 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/customizer/controls/radio-image/images/style-2.png1.92KB1.43KB▼ 25.48%
includes/customizer/controls/radio-image/images/style-1.png2.87KB1.72KB▼ 40.15%
includes/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
admin/assets/logo.png8.95KB4.02KB▼ 55.08%
includes/customizer/controls/radio-image/images/style-3.png2.37KB1.58KB▼ 33.28%