88% ajax-wp-query-search-filter

Code Review | Ajax WP Query Search Filter

WordPress plugin Ajax WP Query Search Filter scored 88% from 54 tests.

About plugin

  • Plugin page: ajax-wp-query-sea...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.7.1
  • WordPress version: 5.8.1
  • First release: Jun 27, 2013
  • Latest release: Mar 2, 2014
  • Number of updates: 29
  • Update frequency: every 8.6 days
  • Top authors: WP_Dummy (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active / 23,045 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.17MB] [CPU: ▼139.26ms] Passed 4 tests

Server-side resources used by Ajax WP Query Search Filter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.01 ▲0.1746.19 ▲13.31
Dashboard /wp-admin3.23 ▲0.1843.67 ▼3.47
Posts /wp-admin/edit.php3.35 ▲0.2443.58 ▼0.70
Add New Post /wp-admin/post-new.php5.60 ▲0.1792.57 ▼553.35
Media Library /wp-admin/upload.php3.18 ▲0.1836.14 ▲0.50

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ajax WP Query Search Filter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12716.20 ▲0.597.82 ▲0.2946.13 ▼8.76
Dashboard /wp-admin2,987 ▲565.87 ▼0.05159.64 ▲16.82104.74 ▲0.47
Posts /wp-admin/edit.php2,759 ▲202.70 ▲0.0164.70 ▲2.32104.62 ▲13.11
Add New Post /wp-admin/post-new.php1,685 ▲1318.76 ▼0.15364.81 ▼6.88115.08 ▲4.97
Media Library /wp-admin/upload.php1,827 ▲205.01 ▼0.02150.50 ▲3.39124.73 ▲5.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
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 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ajax-wp-query-search-filter/admin/add-new.php
  • 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ajax-wp-query-search-filter/admin/fields/add_taxo_form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/ajax-wp-query-search-filter/admin/fields/taxonomy.php:1
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ajax-wp-query-search-filter/classes/list-table-class.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/ajax-wp-query-search-filter/admin/fields/meta_field.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ajax-wp-query-search-filter/admin/fields/add_cmf_form.php:4
    • > PHP Notice
      Undefined index: taxo in wp-content/plugins/ajax-wp-query-search-filter/admin/addTaxoAjax.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/ajax-wp-query-search-filter/admin/fields/post_type.php:1
    • > 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/ajax-wp-query-search-filter/classes/list-table-class.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/ajax-wp-query-search-filter/admin/addTaxoAjax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/ajax-wp-query-search-filter/admin/fields/misc.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Ajax WP Query Search Filter setting page 1), #2 (Ajax WP Query Search Filter setting page 3), #4 (Ajax WP Query Search Filter setting page 4), #5 (Ajax WP Query Search Filter search form in the content and sidebar)
The official readme.txt might help

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

"Ajax WP Query Search Filter" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ajax-wp-query-search-filter.php" instead of "ajaxwpqf.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,791 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP15285471,336
PO File196132207
JavaScript2406166
CSS251182

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity42.50
▷ Minimum class complexity12.00
▷ Maximum class complexity56.00
Average method complexity5.37
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ 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
8 PNG files occupy 0.32MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png51.97KB17.91KB▼ 65.54%
classes/scripts/default.png51.97KB17.91KB▼ 65.54%
screenshot-3.png61.87KB21.14KB▼ 65.82%
admin/scripts/images/plus-icon.png1.65KB1.32KB▼ 19.76%
screenshot-1.png42.09KB15.31KB▼ 63.62%