88% advance-wp-query-search-filter

Code Review | Advance WP Query Search Filter

WordPress plugin Advance WP Query Search Filter scored 88% 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: 5.9.2
  • 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

400+ active / 27,177 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.14MB] [CPU: ▼297.59ms] Passed 4 tests

Server-side resources used by Advance WP Query Search Filter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.6256.68 ▲38.23
Dashboard /wp-admin3.58 ▲0.1736.52 ▼3.61
Posts /wp-admin/edit.php3.81 ▲0.1645.92 ▲1.44
Add New Post /wp-admin/post-new.php7.04 ▲0.0799.34 ▼1,191.82
Media Library /wp-admin/upload.php3.46 ▲0.1629.96 ▲3.63

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 1 new option
New WordPress options
awqsf_spt

Browser metrics Passed 4 tests

An overview of browser requirements for Advance WP Query Search Filter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,892 ▲13816.54 ▲0.529.85 ▲3.922.12 ▼0.78
Dashboard /wp-admin2,908 ▲546.13 ▼0.01121.12 ▼25.22153.86 ▼6.24
Posts /wp-admin/edit.php2,708 ▲173.05 ▼0.1867.80 ▲3.66138.55 ▼7.69
Add New Post /wp-admin/post-new.php1,724 ▲721.07 ▼0.11451.26 ▼9.84157.08 ▼0.45
Media Library /wp-admin/upload.php1,718 ▲205.49 ▼0.05141.11 ▼10.29187.86 ▼2.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /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/cmfdropdown.php
    • > /wp-content/plugins/advance-wp-query-search-filter/html/cmfradio.php
    • > /wp-content/plugins/advance-wp-query-search-filter/html/add-new-awqsf.php
  • 87× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/advance-wp-query-search-filter/modules/awqsf_taxonomy.php:1
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/advance-wp-query-search-filter/html/cmfdropdown.php on line 3
    • > 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 4
    • > PHP Notice
      Undefined variable: c in wp-content/plugins/advance-wp-query-search-filter/html/taxdropdown.php on line 3
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/advance-wp-query-search-filter/html/cmfdropdown.php on line 5
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/advance-wp-query-search-filter/html/cmfcheckbox.php on line 11
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/advance-wp-query-search-filter/html/cmfradio.php on line 3
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/advance-wp-query-search-filter/html/cmfradio.php on line 11
    • > PHP Notice
      Undefined variable: c in wp-content/plugins/advance-wp-query-search-filter/html/taxdropdown.php on line 5
    • > PHP Notice
      Undefined variable: v in wp-content/plugins/advance-wp-query-search-filter/html/cmfcheckbox.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: custom meta field, advanced search, taxonoy, custom post type, taxonomy meta field filter...

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

The main PHP script in "Advance WP Query Search Filter" version 1.0.10 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as 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 glimpse at programming languages used with this plugin and a check that no dangerous files are present
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

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
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%