78% ultimate-field-collections

Code Review | Ultimate Field Collections (UFC) – Field & Content Manager

WordPress plugin Ultimate Field Collections (UFC) – Field & Content Manager scored 78% from 54 tests.

About plugin

  • Plugin page: ultimate-field-co...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 20, 2022
  • Latest release: Dec 21, 2022
  • Number of updates: 17
  • Update frequency: every 5.6 days
  • Top authors: wpufc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 335 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.31ms] Passed 4 tests

Analyzing server-side resources used by Ultimate Field Collections (UFC) – Field & Content Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.36 ▼6.68
Dashboard /wp-admin3.31 ▲0.0045.81 ▼3.00
Posts /wp-admin/edit.php3.36 ▲0.0048.48 ▲0.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.33 ▼11.04
Media Library /wp-admin/upload.php3.23 ▲0.0035.96 ▼0.52

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

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

Browser metrics Passed 4 tests

Ultimate Field Collections (UFC) – Field & Content Manager: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.84 ▲0.471.79 ▼0.0239.67 ▼4.97
Dashboard /wp-admin2,206 ▲184.88 ▲0.01107.94 ▼7.6237.22 ▼4.90
Posts /wp-admin/edit.php2,086 ▼02.01 ▼0.0040.05 ▼0.5434.53 ▲0.48
Add New Post /wp-admin/post-new.php1,523 ▲323.24 ▲0.38662.56 ▼4.8960.58 ▲4.07
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0194.94 ▼3.0142.05 ▲0.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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 fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ultimate-field-collections/templates/ufc-save-field-group-settings-tab.php
    • > /wp-content/plugins/ultimate-field-collections/templates/ufc-save-field-group-post-meta-tab.php
  • 374× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: field_required in wp-content/plugins/ultimate-field-collections/templates/post-meta-edit-view/color_picker.php on line 5
    • > PHP Notice
      Undefined variable: field_required in wp-content/plugins/ultimate-field-collections/templates/post-meta-edit-view/relationship.php on line 5
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/ultimate-field-collections/templates/post-meta-edit-view/checkbox.php on line 8
    • > PHP Notice
      Undefined variable: field_key in wp-content/plugins/ultimate-field-collections/templates/post-meta-edit-view/message.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/ultimate-field-collections/templates/field-edit-view/file.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/ultimate-field-collections/templates/field-edit-view/password.php:2
    • > PHP Notice
      Undefined variable: field_key in wp-content/plugins/ultimate-field-collections/templates/post-meta-edit-view/wysiwyg.php on line 6
    • > PHP Notice
      Undefined variable: field_type in wp-content/plugins/ultimate-field-collections/templates/post-meta-edit-view/link.php on line 3
    • > PHP Notice
      Undefined variable: field_required in wp-content/plugins/ultimate-field-collections/templates/post-meta-edit-view/user.php on line 21
    • > PHP Notice
      Undefined variable: field_required in wp-content/plugins/ultimate-field-collections/templates/post-meta-edit-view/file.php on line 16

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 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (16 tag instead of maximum 10)
You can take inspiration from this readme.txt

ultimate-field-collections/ultimate-field-collections.php 92% from 13 tests

The main PHP file in "Ultimate Field Collections (UFC) – Field & Content Manager" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin84,506 lines of code in 356 files:
LanguageFilesBlank linesComment linesLines of code
SVG150052,565
JavaScript2372,3282,55814,519
PHP731,3889589,119
CSS229352655,210
Markdown880403,077
JSON10016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity72.80
▷ Minimum class complexity1.00
▷ Maximum class complexity250.00
Average method complexity6.61
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods64
▷ Static methods00.00%
▷ Public methods6296.88%
▷ Protected methods00.00%
▷ Private methods23.12%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
32 PNG files occupy 0.23MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/css/libs/select2/select2.png0.51KB0.99KB0.00%
includes/js/libs/ckeditor/skins/moono-lisa/images/lock.png0.49KB0.17KB▼ 64.82%
includes/css/libs/images/ui-icons_777620_256x240.png4.56KB4.18KB▼ 8.31%
includes/js/libs/ckeditor/skins/moono-lisa/images/hidpi/lock.png1.04KB0.40KB▼ 61.68%
includes/js/libs/ckeditor/skins/moono-lisa/images/refresh.png0.74KB0.33KB▼ 56.01%