61% wp-meta-data-filter-and-taxonomy-filter

Code Review | MDTF - Meta Data and Taxonomies Filter

WordPress plugin MDTF - Meta Data and Taxonomies Filter scored61%from 54 tests.

About plugin

  • Plugin page: wp-meta-data-filt...
  • Plugin version: 1.3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.1.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 22, 2014
  • Latest release: Nov 21, 2023
  • Number of updates: 362
  • Update frequency: every 9.7 days
  • Top authors: RealMag777 (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

1,000+ active /79,471 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.50MB] [CPU: ▲5.78ms] Passed 4 tests

An overview of server-side resources used by MDTF - Meta Data and Taxonomies Filter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.96 ▲1.5058.17 ▲16.40
Dashboard /wp-admin4.80 ▲1.4955.26 ▲0.56
Posts /wp-admin/edit.php4.91 ▲1.5562.70 ▲12.78
Add New Post /wp-admin/post-new.php7.41 ▲1.5297.98 ▼2.64
Media Library /wp-admin/upload.php4.72 ▲1.4946.61 ▲12.42
Add New Filter Section /wp-admin/post-new.php?post_type=meta_data_filter4.7857.19
MDTF Constant links /wp-admin/edit.php?post_type=mdf_const_links4.7649.74
MDTF Settings /wp-admin/edit.php?post_type=meta_data_filter&page=mdf_settings5.1764.82
MDTF Sort panels /wp-admin/edit.php?post_type=mdf_woo_sort4.7668.15
MDTF Categories /wp-admin/edit-tags.php?taxonomy=meta_data_filter_cat&post_type=meta_data_filter4.7144.08
MDTF Shortcodes /wp-admin/edit.php?post_type=mdf_shortcodes4.7651.52
MDTF Filters /wp-admin/edit.php?post_type=meta_data_filter4.7747.62

Server storage [IO: ▲5.44MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • Illegal file modification found: 1 file (0.77KB) outside of "wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/template-meta-data-filter.php
Filesystem: 436 new files
Database: 3 new tables, 10 new options
New tables
wp_mdf_stat_tmp
wp_mdf_query_cache
wp_mdf_stat_buffer
New WordPress options
widget_recent-posts
widget_metadatafilter_taxsearch
widget_theysaidso_widget
theysaidso_admin_options
meta_data_filter_settings
can_compress_scripts
widget_recent-comments
meta_data_filter_was_activated
widget_metadatafilter_search
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for MDTF - Meta Data and Taxonomies Filter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,039 ▲27714.26 ▼0.4813.68 ▲11.9043.51 ▲0.15
Dashboard /wp-admin2,278 ▲1005.80 ▲0.0795.64 ▼15.7244.99 ▲2.05
Posts /wp-admin/edit.php2,196 ▲932.34 ▲0.3841.82 ▼2.4335.66 ▼4.11
Add New Post /wp-admin/post-new.php6,297 ▲4,77126.23 ▲3.14917.49 ▲305.0153.69 ▲1.75
Media Library /wp-admin/upload.php1,492 ▲924.39 ▲0.1696.78 ▲1.9941.76 ▲2.37
Add New Filter Section /wp-admin/post-new.php?post_type=meta_data_filter1,8542.9675.6853.83
MDTF Constant links /wp-admin/edit.php?post_type=mdf_const_links1,1572.4834.1228.84
MDTF Settings /wp-admin/edit.php?post_type=meta_data_filter&page=mdf_settings4,76114.30405.4291.85
MDTF Sort panels /wp-admin/edit.php?post_type=mdf_woo_sort1,1542.4637.5728.24
MDTF Categories /wp-admin/edit-tags.php?taxonomy=meta_data_filter_cat&post_type=meta_data_filter1,3712.0534.2029.61
MDTF Shortcodes /wp-admin/edit.php?post_type=mdf_shortcodes1,1702.2833.9028.82
MDTF Filters /wp-admin/edit.php?post_type=meta_data_filter1,2082.4435.7631.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_mdf_stat_tmp
    • wp_mdf_stat_buffer
  • Zombie WordPress options were found after uninstall: 10 options
    • theysaidso_admin_options
    • widget_metadatafilter_search
    • widget_recent-posts
    • meta_data_filter_was_activated
    • widget_metadatafilter_taxsearch
    • widget_theysaidso_widget
    • meta_data_filter_settings
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=meta_data_filter&page=mdf_settings
    • > Notice in wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/views/settings.php+1163
    Undefined index: custom_css_code

SRP 0% 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
Almost there! Just fix the following items
  • 43× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/ext/sort_panel.php
    • > /wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/views/shortcode/do_mdf_search_form.php
    • > /wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/views/const_links/metabox.php
    • > /wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/views/shortcode/search_panel_terms.php
    • > /wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/views/sort_panel/metabox.php
    • > /wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/classes/shortcodes.php
    • > /wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/views/widgets/search_form.php
    • > /wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/views/page/draw_front_page_items.php
    • > /wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/ext/const_links.php
    • > /wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/views/data_meta_box.php
  • 30× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MetaDataFilterCore' not found in wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/ext/mdtf-pagination/tw-pagination.php:23
    • > PHP Notice
      Undefined variable: filter_post_blocks in wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/ext/mdf_posts_messenger/views/show_terms_meta_names.php on line 43
    • > PHP Fatal error
      Uncaught Error: Class 'MetaDataFilterCore' not found in wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/js/js_vars.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/ext/mdf_posts_messenger/views/woo_email_template.php on line 3
    • > PHP Notice
      Undefined variable: subscr in wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/ext/mdf_posts_messenger/views/mdf_email_template.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/ext/mdf_posts_messenger/views/unsubscr_template.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/ext/mdf_posts_messenger/views/mdf_email_template.php on line 4
    • > PHP Notice
      Undefined variable: subscr in wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/ext/mdf_posts_messenger/views/woo_email_template.php on line 6
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/ext/mdf_posts_messenger/views/show_terms_meta_names.php on line 43
    • > PHP Notice
      Undefined variable: subscr in wp-content/plugins/wp-meta-data-filter-and-taxonomy-filter/ext/mdf_posts_messenger/views/woo_email_template.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 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: ajax filter, filter, meta filter, taxonomies filter, woocommerce...

wp-meta-data-filter-and-taxonomy-filter/index.php 77% from 13 tests

This is the main PHP file of "MDTF - Meta Data and Taxonomies Filter" version 1.3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-meta-data-filter-and-taxonomy-filter.php" instead of "index.php")
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "WP 4.1.0")
  • 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin54,255 lines of code in 253 files:
LanguageFilesBlank linesComment linesLines of code
PHP572,11287914,066
CSS981,16287612,369
JavaScript462,5682,71111,639
PO File42,4084,1305,412
HTML717135,300
SVG13113,142
Stylus12546931
Markdown62330666
Sass1313269454
JSON800276

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity64.18
▷ Minimum class complexity1.00
▷ Maximum class complexity359.00
Average method complexity5.86
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes313.64%
Methods286
▷ Static methods20170.28%
▷ Public methods26793.36%
▷ Protected methods00.00%
▷ Private methods196.64%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
137 PNG files occupy 1.07MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
js/icheck/skins/flat/grey@2x.png3.14KB2.77KB▼ 11.72%
js/tooltipster/doc/images/browser-firefox.png9.13KB3.80KB▼ 58.35%
js/tooltipster/doc/images/browser-safari.png12.14KB4.50KB▼ 62.90%
js/icheck/skins/flat/grey.png1.48KB1.65KB0.00%