84% acf-advanced-taxonomy-selector

Code Review | ACF: Advanced Taxonomy Selector

WordPress plugin ACF: Advanced Taxonomy Selector scored 84% from 54 tests.

About plugin

  • Plugin page: acf-advanced-taxo...
  • Plugin version: 3.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2014
  • Latest release: Feb 16, 2019
  • Number of updates: 12
  • Update frequency: every 151.5 days
  • Top authors: danielpataki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 22,921 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.92ms] Passed 4 tests

Server-side resources used by ACF: Advanced Taxonomy Selector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0233.96 ▼9.54
Dashboard /wp-admin3.32 ▲0.0140.85 ▼8.39
Posts /wp-admin/edit.php3.37 ▲0.0145.84 ▼3.93
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.37 ▼5.81
Media Library /wp-admin/upload.php3.24 ▲0.0134.75 ▼0.07

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

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

Browser metrics Passed 4 tests

ACF: Advanced Taxonomy Selector: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼0.991.55 ▼0.8938.45 ▼10.34
Dashboard /wp-admin2,206 ▲185.90 ▲1.04111.26 ▼3.7443.90 ▼3.47
Posts /wp-admin/edit.php2,089 ▲31.97 ▼0.0534.70 ▼0.8129.84 ▼6.20
Add New Post /wp-admin/post-new.php1,514 ▼2817.64 ▼0.62674.35 ▲28.9656.11 ▲1.72
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.0293.78 ▼1.8841.10 ▼1.63

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
It is recommended to fix the following
  • 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 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-advanced-taxonomy-selector/acf-advanced_taxonomy_selector.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-advanced-taxonomy-selector/acf-advanced_taxonomy_selector-v4.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-advanced-taxonomy-selector/acf-advanced_taxonomy_selector-v5.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Screenshot #3 (Selecting terms from multiple taxonomies) image required
You can take inspiration from this readme.txt

acf-advanced-taxonomy-selector/acf-advanced_taxonomy_selector.php 92% from 13 tests

The main file in "ACF: Advanced Taxonomy Selector" v. 3.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("acf-advanced-taxonomy-selector.php" instead of "acf-advanced_taxonomy_selector.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
Good job! No executable or dangerous file extensions detected481 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4129305428
PO File1193853

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin