78% filter-anything

Code Review | Filter Anything

WordPress plugin Filter Anything scored78%from 54 tests.

About plugin

  • Plugin page: filter-anything
  • Plugin version: 0.1.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Aug 1, 2022
  • Latest release: Apr 28, 2023
  • Number of updates: 11
  • Update frequency: every 25.1 days
  • Top authors: vardaamkalrav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /918 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.52MB] [CPU: ▲2.62ms] Passed 4 tests

Server-side resources used by Filter Anything
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5248.18 ▲7.53
Dashboard /wp-admin3.83 ▲0.5257.40 ▲5.48
Posts /wp-admin/edit.php3.94 ▲0.5858.35 ▲2.99
Add New Post /wp-admin/post-new.php6.42 ▲0.5499.15 ▼5.53
Media Library /wp-admin/upload.php3.72 ▲0.4945.17 ▲9.44
Filters /wp-admin/edit.php?post_type=wfa-filters3.8047.25
Add New /wp-admin/post-new.php?post_type=wfa-filters3.9364.18

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

Browser metrics Passed 4 tests

Filter Anything: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,093 ▲33218.16 ▲3.591.81 ▼0.0246.93 ▲5.59
Dashboard /wp-admin2,496 ▲3198.92 ▲3.26172.22 ▲71.8144.70 ▲6.83
Posts /wp-admin/edit.php2,430 ▲3306.09 ▲4.0786.36 ▲45.0835.26 ▼3.62
Add New Post /wp-admin/post-new.php1,618 ▲8119.82 ▲1.67747.72 ▲81.1443.16 ▼22.24
Media Library /wp-admin/upload.php1,564 ▲1646.63 ▲2.41112.34 ▲7.5247.36 ▼0.82
Filters /wp-admin/edit.php?post_type=wfa-filters1,4226.0683.0630.60
Add New /wp-admin/post-new.php?post_type=wfa-filters2,27510.34192.1137.79

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/filter-anything/lib/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 236× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/filter-anything/lib/htmlburger/carbon-fields/templates/Container/user_meta.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/filter-anything/lib/composer/installers/src/Composer/Installers/OxidInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/filter-anything/lib/composer/installers/src/Composer/Installers/PimcoreInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Pimple\\ServiceProviderInterface' not found in wp-content/plugins/filter-anything/lib/htmlburger/carbon-fields/core/Provider/Container_Condition_Provider.php:10
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/filter-anything/lib/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 35
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Container\\Fulfillable\\Fulfillable' not found in wp-content/plugins/filter-anything/lib/htmlburger/carbon-fields/core/Container/Fulfillable/Fulfillable_Collection.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/filter-anything/lib/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function carbon_get_post_meta() in wp-content/plugins/filter-anything/templates/tp_filters.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/filter-anything/lib/htmlburger/carbon-fields/core/Container/Comment_Meta_Container.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/filter-anything/lib/htmlburger/carbon-fields/core/Field/Sidebar_Field.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
9 plugin tags: user filter, filter results, filter, advance filters, directory...

filter-anything/filter-anything.php 85% from 13 tests

"Filter Anything" version 0.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/languages")

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
There were no executable files found in this plugin35,791 lines of code in 590 files:
LanguageFilesBlank linesComment linesLines of code
PHP2823,3807,84813,423
JavaScript1805,2768,58413,383
CSS124641,1733,156
PO File268191,0202,202
Sass4934001,777
JSON800951
Markdown263120718
YAML6393162
XML10019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.08
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces27
Interfaces5
Traits0
Classes238
▷ Abstract classes125.04%
▷ Concrete classes22694.96%
▷ Final classes10.44%
Methods1,159
▷ Static methods1149.84%
▷ Public methods92279.55%
▷ Protected methods20217.43%
▷ Private methods353.02%
Functions115
▷ Named functions2622.61%
▷ Anonymous functions8977.39%
Constants34
▷ Global constants617.65%
▷ Class constants2882.35%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin