78% easy-filtering

Code Review | Easy Filtering

WordPress plugin Easy Filtering scored78%from 54 tests.

About plugin

  • Plugin page: easy-filtering
  • Plugin version: 2.5.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.4
  • WordPress version: 6.3.1
  • First release: Jun 11, 2018
  • Latest release: Nov 5, 2019
  • Number of updates: 48
  • Update frequency: every 10.7 days
  • Top authors: franciscopalacios (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /938 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼4.22ms] Passed 4 tests

An overview of server-side resources used by Easy Filtering
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1547.60 ▲4.20
Dashboard /wp-admin3.62 ▲0.2852.51 ▼14.70
Posts /wp-admin/edit.php3.74 ▲0.3853.77 ▲4.42
Add New Post /wp-admin/post-new.php6.21 ▲0.3288.11 ▼9.10
Media Library /wp-admin/upload.php3.55 ▲0.3239.62 ▲2.71
Edit CARd /wp-admin/admin.php?page=easy-filtering-edit-card3.5234.71
Create Card /wp-admin/admin.php?page=easy-filtering-card-creator3.5239.32
Edit Filter /wp-admin/admin.php?page=easy-filtering-edit-filter3.5236.11
Cards /wp-admin/admin.php?page=easy-filtering-view-cards3.5238.10
Create Filter /wp-admin/admin.php?page=easy-filtering-create-filter3.5536.42
How works /wp-admin/admin.php?page=easy-filtering-help3.5332.74
Filters /wp-admin/admin.php?page=easy-filtering-view-filters3.5236.71

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: 2 new tables, 6 new options
New tables
wp_easy_filtering_filters
wp_easy_filtering_card
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Easy Filtering
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲18814.02 ▼0.7615.99 ▲14.2938.15 ▼6.03
Dashboard /wp-admin2,241 ▲645.69 ▲0.0591.06 ▼3.0243.27 ▲4.93
Posts /wp-admin/edit.php2,146 ▲462.04 ▲0.0543.44 ▲7.5438.82 ▲3.05
Add New Post /wp-admin/post-new.php1,560 ▲3423.13 ▼0.02649.80 ▼32.6757.91 ▲3.84
Media Library /wp-admin/upload.php1,446 ▲464.25 ▲0.09101.34 ▲0.5743.55 ▼1.95
Edit CARd /wp-admin/admin.php?page=easy-filtering-edit-card8342.0426.9021.20
Create Card /wp-admin/admin.php?page=easy-filtering-card-creator9082.2137.6527.47
Edit Filter /wp-admin/admin.php?page=easy-filtering-edit-filter8372.0026.5025.16
Cards /wp-admin/admin.php?page=easy-filtering-view-cards9782.0827.6326.13
Create Filter /wp-admin/admin.php?page=easy-filtering-create-filter1,1702.0426.4726.74
How works /wp-admin/admin.php?page=easy-filtering-help1,0182.0726.9529.37
Filters /wp-admin/admin.php?page=easy-filtering-view-filters1,0052.0826.9226.90

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/easy-filtering/public/views/filter_prices.php
    • > /wp-content/plugins/easy-filtering/public/views/filter-page.php
    • > /wp-content/plugins/easy-filtering/admin/views/easy_filtering_get_taxonomies.php
  • 34× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-filtering/admin/class-filter-list-table.php on line 4
    • > PHP Notice
      Undefined variable: postem_ipsum_taxonomies in wp-content/plugins/easy-filtering/admin/views/easy_filtering_get_taxonomies.php on line 3
    • > PHP Notice
      Undefined variable: max_price in wp-content/plugins/easy-filtering/public/views/filter_prices.php on line 11
    • > PHP Notice
      Undefined variable: filter_mode in wp-content/plugins/easy-filtering/public/views/filter-page.php on line 90
    • > PHP Notice
      Undefined variable: filter_order_frontend in wp-content/plugins/easy-filtering/public/views/filter-page.php on line 15
    • > PHP Notice
      Undefined variable: filter_post_type in wp-content/plugins/easy-filtering/public/views/filter-page.php on line 10
    • > 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/easy-filtering/admin/class-card-list-table.php on line 4
    • > 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/easy-filtering/admin/class-filter-list-table.php on line 4
    • > PHP Notice
      Undefined variable: filter_taxonomy in wp-content/plugins/easy-filtering/public/views/filter-page.php on line 13
    • > 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/easy-filtering/admin/class-card-list-table.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4 in easy-filtering/assets to your readme.txt
You can look at the official readme.txt

easy-filtering/easy-filtering.php Passed 13 tests

"Easy Filtering" version 2.5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
24 characters long description:
Filter contents via ajax

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected5,133 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP281,2422362,896
JavaScript55131231,152
CSS31331511,045
Markdown113035
SVG1015

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity59.25
▷ Minimum class complexity9.00
▷ Maximum class complexity139.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods63
▷ Static methods00.00%
▷ Public methods63100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions763.64%
▷ Anonymous functions436.36%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/img/loading.png21.15KB8.81KB▼ 58.35%
public/views/img/no-image.png5.38KB3.49KB▼ 35.13%
admin/views/images/placeholder.png4.67KB1.86KB▼ 60.19%