78% fancy-fiter

Code Review | Fancy Filter - Category based filter

WordPress plugin Fancy Filter - Category based filter scored78%from 54 tests.

About plugin

  • Plugin page: fancy-fiter
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Oct 22, 2021
  • Latest release: May 8, 2023
  • Number of updates: 11
  • Update frequency: every 51.2 days
  • Top authors: sharabindu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /759 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.40MB] [CPU: ▼2.55ms] Passed 4 tests

Server-side resources used by Fancy Filter - Category based filter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4245.79 ▲6.75
Dashboard /wp-admin3.73 ▲0.4250.40 ▲0.84
Posts /wp-admin/edit.php3.78 ▲0.4246.63 ▼2.77
Add New Post /wp-admin/post-new.php6.43 ▲0.5487.69 ▼10.02
Media Library /wp-admin/upload.php3.59 ▲0.3537.14 ▲1.75
Add New Portfolio /wp-admin/post-new.php?post_type=fancyfilter6.4284.92
Settings /wp-admin/edit.php?post_type=fancyfilter&page=fancyfilter_settings3.6839.57
Portfolio Category /wp-admin/edit-tags.php?taxonomy=fl_portfolio&post_type=fancyfilter3.5835.67
All Portfolios /wp-admin/edit.php?post_type=fancyfilter3.6339.21
How It Works /wp-admin/edit.php?post_type=fancyfilter&page=how_it_works3.5533.75
All Created shortcode /wp-admin/edit.php?post_type=morefilter3.6339.55

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 110 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Fancy Filter - Category based filter: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲14814.12 ▼0.271.62 ▼0.2844.90 ▲0.31
Dashboard /wp-admin2,281 ▲985.69 ▲0.78112.85 ▲2.8339.14 ▼4.16
Posts /wp-admin/edit.php2,145 ▲562.31 ▲0.3237.18 ▲0.8534.48 ▼0.48
Add New Post /wp-admin/post-new.php6,371 ▲4,83826.23 ▲3.23934.07 ▲261.9463.97 ▲8.29
Media Library /wp-admin/upload.php1,461 ▲764.76 ▲0.5791.43 ▼8.9340.48 ▼0.83
Add New Portfolio /wp-admin/post-new.php?post_type=fancyfilter6,37019.41868.6543.27
Settings /wp-admin/edit.php?post_type=fancyfilter&page=fancyfilter_settings3,7273.59138.23128.87
Portfolio Category /wp-admin/edit-tags.php?taxonomy=fl_portfolio&post_type=fancyfilter1,3452.4231.3327.15
All Portfolios /wp-admin/edit.php?post_type=fancyfilter1,1172.5738.1730.64
How It Works /wp-admin/edit.php?post_type=fancyfilter&page=how_it_works1,1302.3227.8142.05
All Created shortcode /wp-admin/edit.php?post_type=morefilter1,1172.5837.2527.75

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/fancy-fiter/includes/helper/features.php
  • 34× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant FANCYFILTER_URL - assumed 'FANCYFILTER_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/fancy-fiter/includes/helper/features.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/fancy-fiter/metaData/FancyMetaExtra/BlogData.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-fiter/metaData/class-fancy_previewlink.php:21
    • > PHP Warning
      Use of undefined constant FANCYFILTER_URL - assumed 'FANCYFILTER_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/fancy-fiter/includes/helper/features.php on line 69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-fiter/metaData/class-fancy_productMetadata.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-fiter/metaData/class-fancy_portfolio_Metada.php:22
    • > PHP Warning
      Use of undefined constant FANCYFILTER_URL - assumed 'FANCYFILTER_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/fancy-fiter/includes/helper/features.php on line 61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-fiter/includes/Class/class-fancifilter-howto-use.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/fancy-fiter/includes/extra/PortfolioCssdata.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-fiter/includes/Class/class-fancyfilter_permalink.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% 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:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt is a good inspiration

fancy-fiter/fancy-filter.php 85% from 13 tests

"Fancy Filter - Category based filter" version 1.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("fancy-fiter.php" instead of "fancy-filter.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin5,214 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP359275363,221
CSS426541,502
JavaScript778258475
SVG72016

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity11.11
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods75
▷ Static methods22.67%
▷ Public methods7194.67%
▷ Protected methods00.00%
▷ Private methods45.33%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
12 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/2cl-min.png0.43KB0.43KB0.00%
assets/img/placeholder.png6.00KB5.03KB▼ 16.19%
assets/admin/img/play.png2.79KB2.25KB▼ 19.17%
assets/img/next.png1.32KB1.58KB0.00%
assets/img/logo.png7.24KB2.88KB▼ 60.27%