67% wp-search-filter

Code Review | WP Search Filter

WordPress plugin WP Search Filter scored 67% from 54 tests.

About plugin

  • Plugin page: wp-search-filter
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.1
  • WordPress version: 5.9.2
  • First release: May 31, 2019
  • Latest release: May 31, 2019
  • Number of updates: 6
  • Update frequency: every 2.8 days
  • Top authors: pippozanardo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 651 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 gracefully, with no errors

Server metrics [RAM: ▲4.54MB] [CPU: ▼263.41ms] Passed 4 tests

Analyzing server-side resources used by WP Search Filter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /8.06 ▲4.5490.83 ▲40.31
Dashboard /wp-admin7.97 ▲4.5672.51 ▲40.83
Posts /wp-admin/edit.php8.20 ▲4.5675.17 ▲36.70
Add New Post /wp-admin/post-new.php11.48 ▲4.50124.62 ▼1,156.38
Media Library /wp-admin/upload.php7.91 ▲4.6152.09 ▲25.73
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius8.1655.36

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 850 new files
Database: no new tables, 6 new options
New WordPress options
fs_gdpr
fs_api_cache
fs_accounts
widget_wpsf_widget
fs_active_plugins
fs_debug_mode

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Search Filter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,058 ▲30421.36 ▲5.656.24 ▲0.552.27 ▼0.55
Dashboard /wp-admin3,181 ▲32311.28 ▲5.10205.60 ▲65.83169.96 ▲5.65
Posts /wp-admin/edit.php3,016 ▲3228.20 ▲4.97140.10 ▲75.72154.05 ▲13.88
Add New Post /wp-admin/post-new.php1,688 ▼6817.12 ▲0.01522.65 ▲120.88157.18 ▼15.82
Media Library /wp-admin/upload.php1,793 ▲958.74 ▲3.17171.60 ▲27.99204.29 ▲8.52
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius1,7527.95132.51127.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • fs_debug_mode
    • fs_api_cache
    • widget_wpsf_widget
    • fs_accounts
    • fs_active_plugins
    • fs_gdpr

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
Please fix the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-search-filter/templates/wpsf-advanced-filter.php
    • > /wp-content/plugins/wp-search-filter/vendor/symfony/translation/Resources/bin/translation-status.php
    • > /wp-content/plugins/wp-search-filter/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
    • > /wp-content/plugins/wp-search-filter/freemius/templates/ajax-loader.php
  • 226× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: view in wp-content/plugins/wp-search-filter/vendor/symfony/translation/Tests/fixtures/extractor/translation.html.php on line 2
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/wp-search-filter/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Extractor\\ExtractorInterface' not found in wp-content/plugins/wp-search-filter/vendor/symfony/translation/Extractor/ChainExtractor.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Textarea_Field' not found in wp-content/plugins/wp-search-filter/vendor/htmlburger/carbon-fields/core/Field/Rich_Text_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Dumper\\DumperInterface' not found in wp-content/plugins/wp-search-filter/vendor/symfony/translation/Dumper/FileDumper.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Catalogue\\OperationInterface' not found in wp-content/plugins/wp-search-filter/vendor/symfony/translation/Catalogue/AbstractOperation.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\ServiceProvider' not found in wp-content/plugins/wp-search-filter/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-search-filter/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/wp-search-filter/vendor/htmlburger/carbon-fields/core/Container/Condition/Current_User_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/wp-search-filter/vendor/htmlburger/carbon-fields/core/Service/Meta_Query_Service.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Interface) image not found
Please take inspiration from this readme.txt

wp-search-filter/wp-search-filter.php 92% from 13 tests

The entry point to "WP Search Filter" version 0.0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Almost there! Just fix the following issues
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-search-filter/vendor/nesbot/carbon/bin/upgrade-carbon.bat
155,458 lines of code in 759 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14816,15827,71166,452
PHP46111,75327,89949,984
PO File316,9188,63915,098
JSON170014,964
XSD499764,991
Sass28399772,515
CSS39316128695
Markdown81430416
XML1630321
Qt Linguist10010
YAML4007
DOS Batch1004
INI1001

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,360)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 157)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity19.62
▷ Minimum class complexity1.00
▷ Maximum class complexity2,360.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity157.00
Code structure
Namespaces50
Interfaces20
Traits0
Classes282
▷ Abstract classes196.74%
▷ Concrete classes26393.26%
▷ Final classes20.76%
Methods2,880
▷ Static methods43315.03%
▷ Public methods2,26378.58%
▷ Protected methods2468.54%
▷ Private methods37112.88%
Functions263
▷ Named functions16562.74%
▷ Anonymous functions9837.26%
Constants199
▷ Global constants10753.77%
▷ Class constants9246.23%
▷ Public constants92100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/wp-search-filter.png9.16KB5.26KB▼ 42.58%