84% acf-conditional-logic-extended

Code Review | ACF Conditional Logic Extended

WordPress plugin ACF Conditional Logic Extended scored84%from 54 tests.

About plugin

  • Plugin page: acf-conditional-l...
  • Plugin version: 1.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 22, 2022
  • Latest release: Oct 30, 2022
  • Number of updates: 10
  • Update frequency: every 13.0 days
  • Top authors: kancijan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,030 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.02MB] [CPU: ▼9.37ms] Passed 4 tests

A check of server-side resources used by ACF Conditional Logic Extended
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.42 ▼3.47
Dashboard /wp-admin3.33 ▲0.0249.11 ▼1.87
Posts /wp-admin/edit.php3.38 ▲0.0248.13 ▼6.03
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.89 ▼23.01
Media Library /wp-admin/upload.php3.25 ▲0.0234.55 ▼4.95

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for ACF Conditional Logic Extended
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▼0.381.92 ▼0.2139.44 ▼5.41
Dashboard /wp-admin2,198 ▲185.59 ▲0.0596.04 ▲6.0143.01 ▼4.77
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0139.72 ▼2.2036.07 ▼1.11
Add New Post /wp-admin/post-new.php1,535 ▼518.12 ▼4.63630.72 ▼20.1568.65 ▲11.59
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.0998.84 ▼3.7242.66 ▼2.38

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/acf-conditional-logic-extended/includes/admin/views/field-group-conditional-logic.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/acf-conditional-logic-extended/includes/admin/views/html-conditional-group.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/acf-conditional-logic-extended/includes/admin/views/html-conditional-rule.php:7
    • > PHP Notice
      Undefined variable: rule in wp-content/plugins/acf-conditional-logic-extended/includes/admin/views/html-conditional-rule.php on line 4
    • > PHP Notice
      Undefined variable: rule in wp-content/plugins/acf-conditional-logic-extended/includes/admin/views/html-conditional-rule.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acf-conditional-logic-extended/includes/admin/views/html-conditional-rule.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acf-conditional-logic-extended/includes/admin/views/html-conditional-rule.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: fields, conditional, custom, extended, acf...

acf-conditional-logic-extended/acf-conditional-logic-extended.php 85% from 13 tests

"ACF Conditional Logic Extended" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.4" instead of "7.2")
  • 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 file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected817 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP14204478742
JavaScript2241975

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity3.38
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods33
▷ Static methods412.12%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin