84% search-filter

Code Review | Search & Filter

WordPress plugin Search & Filter scored84%from 54 tests.

About plugin

  • Plugin page: search-filter
  • Plugin version: 1.2.16
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2013
  • Latest release: Jul 18, 2023
  • Number of updates: 94
  • Update frequency: every 38.3 days
  • Top authors: DesignsAndCode (81.91%)codeamp (19.15%)

Code review

54 tests

User reviews

163 reviews

Install metrics

50,000+ active /740,944 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼6.49ms] Passed 4 tests

A check of server-side resources used by Search & Filter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2639.23 ▼2.82
Dashboard /wp-admin3.56 ▲0.2146.64 ▼12.29
Posts /wp-admin/edit.php3.67 ▲0.3247.90 ▲2.74
Add New Post /wp-admin/post-new.php6.14 ▲0.2586.25 ▼13.59
Media Library /wp-admin/upload.php3.48 ▲0.2538.74 ▲4.34

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
searchandfilter_version
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Search & Filter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲9014.26 ▼0.331.55 ▼0.1341.51 ▼3.22
Dashboard /wp-admin2,258 ▲845.63 ▼0.0085.00 ▼18.6935.53 ▼11.47
Posts /wp-admin/edit.php2,161 ▲612.02 ▲0.0438.20 ▲0.5632.86 ▲0.80
Add New Post /wp-admin/post-new.php1,557 ▲3123.04 ▲0.15610.62 ▲17.2159.82 ▲11.19
Media Library /wp-admin/upload.php1,460 ▲634.25 ▲0.06107.78 ▲1.4345.35 ▲1.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • searchandfilter_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template() in wp-content/plugins/search-filter/search-filter.php:21
    • > 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/search-filter/of-list-table.php on line 6
    • > 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/search-filter/of-list-table.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/search-filter/search-filter.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/search-filter/of-admin.php:7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/search-filter/of-list-table.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/search-filter/of-taxonomy-walker.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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 need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

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

This is the main PHP file of "Search & Filter" version 1.2.16, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,866 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP43531601,596
CSS65212269
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity63.60
▷ Minimum class complexity5.00
▷ Maximum class complexity246.00
Average method complexity8.11
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods44
▷ Static methods00.00%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/icon.png0.52KB0.34KB▼ 33.65%