74% query-filter

Code Review | Query Filter

WordPress plugin Query Filter scored74%from 54 tests.

About plugin

  • Plugin page: query-filter
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.3
  • WordPress version: 6.3.1
  • First release: Jul 25, 2015
  • Latest release: Jul 25, 2015
  • Number of updates: 7
  • Update frequency: every 2.3 days
  • Top authors: marsjaninzmarsa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,318 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.45MB] [CPU: ▼51.97ms] Passed 4 tests

Server-side resources used by Query Filter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.56 ▼0.9111.39 ▼31.63
Dashboard /wp-admin2.57 ▼0.7811.71 ▼54.81
Posts /wp-admin/edit.php2.57 ▼0.7913.54 ▼36.64
Add New Post /wp-admin/post-new.php2.57 ▼3.3216.30 ▼84.79
Media Library /wp-admin/upload.php2.57 ▼0.6611.38 ▼27.06

Server storage [IO: ▲0.18MB] [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: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_j_query_filter_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Query Filter: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.371.64 ▼0.4047.55 ▲3.53
Dashboard /wp-admin2,198 ▲245.62 ▼0.0584.76 ▼14.9937.13 ▼9.08
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0736.96 ▼1.1635.90 ▼2.79
Add New Post /wp-admin/post-new.php1,526 ▼023.79 ▲0.71690.81 ▲20.2955.05 ▼3.63
Media Library /wp-admin/upload.php1,397 ▼64.18 ▲0.01101.68 ▼1.3143.43 ▲1.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/query-filter/inc/JQueryFilterWidget.php+235
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_j_query_filter_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/query-filter/j-query-filter.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/query-filter/inc/JQueryFilterWidget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/query-filter/trunk/inc/JQueryFilterWidget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/query-filter/trunk/j-query-filter.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: advanced, custom post type, filter, meta, taxonomy...

query-filter/j-query-filter.php 92% from 13 tests

Analyzing the main PHP file in "Query Filter" version 0.0.2
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("query-filter.php" instead of "j-query-filter.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
No dangerous file extensions were detected2,226 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP52253571,461
JavaScript37624358
CSS101253
YAML200154

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity122.00
▷ Minimum class complexity44.00
▷ Maximum class complexity245.00
Average method complexity5.84
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods150
▷ Static methods4026.67%
▷ Public methods4429.33%
▷ Protected methods42.67%
▷ Private methods10268.00%
Functions20
▷ Named functions1260.00%
▷ Anonymous functions840.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/default/arrow.png0.95KB0.15KB▼ 84.02%
css/default/slider-handle.png3.26KB0.69KB▼ 78.93%
trunk/css/default/stripes.png1.00KB0.12KB▼ 88.20%
trunk/css/default/slider-handle.png3.26KB0.69KB▼ 78.93%
trunk/css/default/arrow.png0.95KB0.15KB▼ 84.02%