78% taxonomy-filter

Code Review | Taxonomy filter

WordPress plugin Taxonomy filter scored78%from 54 tests.

About plugin

  • Plugin page: taxonomy-filter
  • Plugin version: 2.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Nov 12, 2014
  • Latest release: Nov 15, 2022
  • Number of updates: 68
  • Update frequency: every 43.0 days
  • Top authors: lando1982 (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /25,695 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.67ms] Passed 4 tests

This is a short check of server-side resources used by Taxonomy filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1245.00 ▲1.39
Dashboard /wp-admin3.43 ▲0.1253.77 ▼3.51
Posts /wp-admin/edit.php3.54 ▲0.1849.87 ▼3.05
Add New Post /wp-admin/post-new.php6.01 ▲0.1287.75 ▼17.10
Media Library /wp-admin/upload.php3.35 ▲0.1240.24 ▲0.98
Taxonomy filter /wp-admin/options-general.php?page=taxonomy_filter3.3235.22

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Taxonomy filter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲1214.31 ▼0.051.79 ▼0.4942.96 ▼2.15
Dashboard /wp-admin2,204 ▲305.54 ▼0.0795.32 ▼5.1543.26 ▼1.37
Posts /wp-admin/edit.php2,109 ▲92.04 ▲0.0540.05 ▲4.5037.11 ▼2.19
Add New Post /wp-admin/post-new.php1,551 ▲623.33 ▲0.18653.01 ▼12.8960.66 ▲8.34
Media Library /wp-admin/upload.php1,409 ▲94.31 ▲0.0796.79 ▼23.3441.67 ▼5.86
Taxonomy filter /wp-admin/options-general.php?page=taxonomy_filter8942.0727.0425.86

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/taxonomy-filter/taxonomy-filter.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/taxonomy-filter/taxonomy-filter-users.php:92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/taxonomy-filter/taxonomy-filter-bulks.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/taxonomy-filter/taxonomy-filter-settings.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Settings admin page), #2 (Filter tags (initial list before filtering and filtered list)), #3 (Filter categories (initial list before filtering and filtered list)), #4 (Bulk edit section), #5 (User hidden taxonomy terms selection)
The official readme.txt might help

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

The entry point to "Taxonomy filter" version 2.2.9 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)

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
Success! There were no dangerous files found in this plugin5,549 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JSON1004,754
PHP7106269615
PO File1317192
CSS18288

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon32.png1.28KB1.02KB▼ 20.35%