78% advance-wp-query-search-filter

Code Review | Advance WP Query Search Filter

WordPress plugin Advance WP Query Search Filter scored78%from 54 tests.

About plugin

  • Plugin page: advance-wp-query-...
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 3, 2013
  • Latest release: Mar 2, 2014
  • Number of updates: 32
  • Update frequency: every 11.6 days
  • Top authors: WP_Dummy (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

200+ active /27,581 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
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼4.73ms] Passed 4 tests

This is a short check of server-side resources used by Advance WP Query Search Filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.11 ▼0.29
Dashboard /wp-admin3.47 ▲0.1649.45 ▼1.26
Posts /wp-admin/edit.php3.58 ▲0.2251.73 ▼1.75
Add New Post /wp-admin/post-new.php6.05 ▲0.1684.15 ▼15.61
Media Library /wp-admin/upload.php3.39 ▲0.1637.38 ▲3.01

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
awqsf_spt
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Advance WP Query Search Filter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲10213.66 ▼0.529.28 ▲6.8844.66 ▼1.68
Dashboard /wp-admin2,211 ▲375.64 ▲0.0493.28 ▼0.0539.21 ▼1.44
Posts /wp-admin/edit.php2,116 ▲162.15 ▲0.2040.44 ▲0.8535.04 ▲0.48
Add New Post /wp-admin/post-new.php1,539 ▲1123.00 ▼0.31675.66 ▲58.5857.06 ▲7.49
Media Library /wp-admin/upload.php1,419 ▲194.18 ▲0.03101.93 ▲0.5340.19 ▼5.79

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 did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/advance-wp-query-search-filter/html/add-new-awqsf.php
    • > /wp-content/plugins/advance-wp-query-search-filter/html/cmfcheckbox.php
    • > /wp-content/plugins/advance-wp-query-search-filter/html/taxdropdown.php
    • > /wp-content/plugins/advance-wp-query-search-filter/html/cmfradio.php
    • > /wp-content/plugins/advance-wp-query-search-filter/html/cmfdropdown.php
  • 87× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/advance-wp-query-search-filter/html/cmfcheckbox.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advance-wp-query-search-filter/html/taxdropdown.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advance-wp-query-search-filter/html/cmfdropdown.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advance-wp-query-search-filter/html/cmfdropdown.php on line 6
    • > PHP Notice
      Undefined variable: count in wp-content/plugins/advance-wp-query-search-filter/html/taxcheckbox.php on line 3
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/advance-wp-query-search-filter/html/cmfcheckbox.php on line 6
    • > PHP Notice
      Undefined variable: c in wp-content/plugins/advance-wp-query-search-filter/html/taxdropdown.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advance-wp-query-search-filter/modules/add_cmf_form.php:4
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/advance-wp-query-search-filter/html/cmfdropdown.php on line 2
    • > 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/advance-wp-query-search-filter/includes/class-awqsf-form-table.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: advanced search, taxonoy, custom post type, taxonomy meta field filter, search filter...

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

"Advance WP Query Search Filter" version 1.0.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advance-wp-query-search-filter.php" instead of "advance-wp-sf2.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,584 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP20281481,257
PO File190123193
JavaScript2235112
CSS251522

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity37.00
▷ Minimum class complexity12.00
▷ Maximum class complexity62.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.20MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png57.94KB25.22KB▼ 56.47%
screenshot-2.png51.31KB23.02KB▼ 55.13%
screenshot-1.png97.83KB40.06KB▼ 59.05%