67% add-search-to-menu

Code Review | Ivory Search - WordPress Search Plugin

WordPress plugin Ivory Search - WordPress Search Plugin scored67%from 54 tests.

About plugin

  • Plugin page: add-search-to-menu
  • Plugin version: 5.5.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.4
  • WordPress version: 6.3.1
  • First release: Apr 6, 2017
  • Latest release: Oct 31, 2023
  • Number of updates: 130
  • Update frequency: every 18.5 days
  • Top authors: vinod dalvi (100%)

Code review

54 tests

User reviews

1271 reviews

Install metrics

100,000+ active /2,007,388 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.72MB] [CPU: ▼5.16ms] Passed 4 tests

A check of server-side resources used by Ivory Search - WordPress Search Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6844.27 ▲3.05
Dashboard /wp-admin4.05 ▲0.7151.28 ▼12.46
Posts /wp-admin/edit.php4.09 ▲0.7353.80 ▲9.67
Add New Post /wp-admin/post-new.php6.68 ▲0.7981.33 ▼15.74
Media Library /wp-admin/upload.php4.01 ▲0.7838.92 ▲4.51
Add New /wp-admin/admin.php?page=ivory-search-new3.5726.82
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius4.2840.67

Server storage [IO: ▲4.02MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 238 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
is_install
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
fs_accounts
fs_active_plugins
fs_debug_mode
can_compress_scripts
...

Browser metrics Passed 4 tests

Checking browser requirements for Ivory Search - WordPress Search Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18613.39 ▼0.978.77 ▲7.0629.93 ▼15.12
Dashboard /wp-admin2,230 ▲495.62 ▼0.0393.60 ▼23.4043.14 ▲1.07
Posts /wp-admin/edit.php2,133 ▲332.04 ▲0.0240.10 ▲4.1040.03 ▲4.89
Add New Post /wp-admin/post-new.php1,544 ▲1823.16 ▲0.27674.33 ▼20.8153.16 ▲1.36
Media Library /wp-admin/upload.php1,435 ▲444.19 ▼0.1797.23 ▼1.1146.88 ▲3.45
Add New /wp-admin/admin.php?page=ivory-search-new280.420.093.73
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0841.6724.4428.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/add-search-to-menu/includes/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_recent-posts
    • fs_debug_mode
    • widget_theysaidso_widget
    • fs_accounts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_is_widget
    • db_upgraded
    • fs_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/add-search-to-menu/includes/class-is-widget.php:5
    • > 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
      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
      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: 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_shortcode() in wp-content/plugins/add-search-to-menu/includes/class-is-admin-public.php:389
    • > 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 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 a smoke test targeting browser errors/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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

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

The entry point to "Ivory Search - WordPress Search Plugin" version 5.5.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 152 characters long)

Code Analysis 95% from 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
There were no executable files found in this plugin48,615 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code
PHP1549,96620,65845,079
CSS20338301,850
JavaScript122392921,686

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 146)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity79.76
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.89
▷ Minimum method complexity1.00
▷ Maximum method complexity146.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes81
▷ Abstract classes22.47%
▷ Concrete classes7997.53%
▷ Final classes11.27%
Methods1,660
▷ Static methods26616.02%
▷ Public methods1,22273.61%
▷ Protected methods482.89%
▷ Private methods39023.49%
Functions111
▷ Named functions10594.59%
▷ Anonymous functions65.41%
Constants181
▷ Global constants10759.12%
▷ Class constants7440.88%
▷ Public constants74100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
includes/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
includes/customizer/controls/radio-image/images/style-2.png1.92KB1.43KB▼ 25.48%
admin/assets/logo.png8.95KB4.02KB▼ 55.08%
includes/customizer/controls/radio-image/images/style-1.png2.87KB1.72KB▼ 40.15%