78% easy-filter

Code Review | Easy Filter

WordPress plugin Easy Filter scored 78% from 54 tests.

About plugin

  • Plugin page: easy-filter
  • Plugin version: 1.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9
  • WordPress version: 6.3.1
  • First release: Oct 12, 2012
  • Latest release: Nov 9, 2017
  • Number of updates: 42
  • Update frequency: every 44.1 days
  • Top authors: ronisaha (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

200+ active / 9,587 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.73ms] Passed 4 tests

This is a short check of server-side resources used by Easy Filter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.64 ▼1.58
Dashboard /wp-admin3.33 ▲0.0242.96 ▼5.64
Posts /wp-admin/edit.php3.47 ▲0.1144.13 ▲1.40
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.03 ▼23.43
Media Library /wp-admin/upload.php3.25 ▲0.0232.14 ▼0.25
Easy Filter /wp-admin/options-general.php?page=ez-filter3.2830.56

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

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

Browser metrics Passed 4 tests

Easy Filter: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7213.12 ▼1.165.14 ▲3.1639.41 ▼0.42
Dashboard /wp-admin2,210 ▲215.83 ▲0.8893.92 ▼17.2339.49 ▼2.04
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0235.57 ▲1.7732.71 ▼2.73
Add New Post /wp-admin/post-new.php1,545 ▲1118.52 ▼4.73591.13 ▼72.6549.87 ▼13.42
Media Library /wp-admin/upload.php1,392 ▲74.25 ▲0.0596.94 ▲3.7841.78 ▲1.25
Easy Filter /wp-admin/options-general.php?page=ez-filter9511.7428.0928.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ez-filter
    • > Notice in wp-content/plugins/easy-filter/Views/option.php+116
    Trying to access array offset on value of type bool
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ez-filter
    • > Notice in wp-content/plugins/easy-filter/Views/option.php+116
    Trying to access array offset on value of type null

SRP 50% 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/easy-filter/Views/option.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EzFilter\\Classes\\register_deactivation_hook() in wp-content/plugins/easy-filter/Classes/EzFilter.php:29

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: post type filter, taxonomy filter, post type, admin post filter, filter...

easy-filter/ez-filter.php 92% from 13 tests

Analyzing the main PHP file in "Easy Filter" version 1.10
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-filter.php" instead of "ez-filter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected787 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP815018683
JavaScript2151484
CSS25520

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity17.83
▷ Minimum class complexity2.00
▷ Maximum class complexity49.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods49
▷ Static methods48.16%
▷ Public methods3367.35%
▷ Protected methods00.00%
▷ Private methods1632.65%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
assets/css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
assets/css/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%