78% ultimate-fields

Code Review | Ultimate Fields

WordPress plugin Ultimate Fields scored 78% from 54 tests.

About plugin

  • Plugin page: ultimate-fields
  • Plugin version: 3.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.5
  • WordPress version: 5.8.1
  • First release: Mar 26, 2014
  • Latest release: May 15, 2018
  • Number of updates: 45
  • Update frequency: every 33.6 days
  • Top authors: RadoGeorgiev (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

1,000+ active / 11,431 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▼137.66ms] Passed 4 tests

A check of server-side resources used by Ultimate Fields
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2137.28 ▲16.17
Dashboard /wp-admin3.26 ▲0.2148.23 ▲2.43
Posts /wp-admin/edit.php3.31 ▲0.2044.70 ▼0.00
Add New Post /wp-admin/post-new.php5.56 ▲0.1294.76 ▼553.91
Media Library /wp-admin/upload.php3.21 ▲0.2034.83 ▲0.86
Settings /wp-admin/edit.php?post_type=ultimate-fields&page=settings3.2634.99
Add New /wp-admin/post-new.php?post_type=ultimate-fields4.3783.04
Ultimate Fields /wp-admin/edit.php?post_type=ultimate-fields2.9936.70

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 337 new files
Database: no new tables, 2 new options
New WordPress options
uf_boarding_finished
uf_v1_to_v2

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultimate Fields
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,765 ▲16915.97 ▲0.4610.20 ▲0.3148.13 ▼2.63
Dashboard /wp-admin3,030 ▲965.98 ▼0.13143.09 ▼6.55101.87 ▼12.81
Posts /wp-admin/edit.php2,804 ▲652.72 ▲0.0171.17 ▲4.5088.90 ▼6.07
Add New Post /wp-admin/post-new.php1,527 ▼14518.84 ▼0.07391.30 ▼21.29103.26 ▼3.82
Media Library /wp-admin/upload.php1,868 ▲614.96 ▼0.05153.22 ▼36.14110.92 ▼6.05
Settings /wp-admin/edit.php?post_type=ultimate-fields&page=settings1,4613.5695.50115.07
Add New /wp-admin/post-new.php?post_type=ultimate-fields3,2849.95276.97121.57
Ultimate Fields /wp-admin/edit.php?post_type=ultimate-fields1,6263.0493.42163.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • uf_boarding_finished
    • uf_v1_to_v2

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 29× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/ultimate-fields/core/templates/field/repeater/base.php
    • > /wp-content/plugins/ultimate-fields/core/templates/field/repeater/prototype.php
    • > /wp-content/plugins/ultimate-fields/core/templates/section.php
    • > /wp-content/plugins/ultimate-fields/core/templates/field/wrap/normal.php
    • > /wp-content/plugins/ultimate-fields/core/templates/field/object-preview.php
    • > /wp-content/plugins/ultimate-fields/core/templates/field/image-select.php
    • > /wp-content/plugins/ultimate-fields/core/templates/field/repeater/popup-group.php
    • > /wp-content/plugins/ultimate-fields/core/templates/field/objects-preview.php
    • > /wp-content/plugins/ultimate-fields/core/templates/container/options.php
    • > /wp-content/plugins/ultimate-fields/core/templates/container/inline-tab.php
  • 134× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultimate-fields/ui/templates/settings/json.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Ultimate_Fields\\UI\\Field_Helper' not found in wp-content/plugins/ultimate-fields/ui/classes/Field_Helper/Number.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Ultimate_Fields\\UI\\Field_Helper' not found in wp-content/plugins/ultimate-fields/ui/classes/Field_Helper/Tab.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ultimate-fields/ui/templates/ui/save-box.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Ultimate_Fields\\Field' not found in wp-content/plugins/ultimate-fields/core/classes/Field/Number.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/ultimate-fields/core/templates/container/options-page.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Ultimate_Fields\\Field' not found in wp-content/plugins/ultimate-fields/ui/classes/Field/Field_Selector.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Ultimate_Fields\\UI\\Field_Helper' not found in wp-content/plugins/ultimate-fields/ui/classes/Field_Helper/WP_Object.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Ultimate_Fields\\Helper\\Object\\Item' not found in wp-content/plugins/ultimate-fields/core/classes/Helper/Object/Item/Post.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Ultimate_Fields\\Field' not found in wp-content/plugins/ultimate-fields/core/classes/Field/Select.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #4 (A post meta box with a few simple fields and a repeater) image missing
  • Screenshots: Add a description for screenshot #3 in ultimate-fields/assets to your readme.txt
You can look at the official readme.txt

ultimate-fields/ultimate-fields.php 92% from 13 tests

The entry point to "Ultimate Fields" version 3.0.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 212 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin36,546 lines of code in 321 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript884,4772,77916,262
PHP1863,70510,59213,522
Sass40523412,711
CSS5228172,422
PO File17551,1431,628
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity16.74
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces16
Interfaces0
Traits5
Classes113
▷ Abstract classes87.08%
▷ Concrete classes10592.92%
▷ Final classes00.00%
Methods1,045
▷ Static methods14413.78%
▷ Public methods92188.13%
▷ Protected methods12211.67%
▷ Private methods20.19%
Functions23
▷ Named functions2295.65%
▷ Anonymous functions14.35%
Constants20
▷ Global constants945.00%
▷ Class constants1155.00%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 compressed PNG files occupy 0.25MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ui/assets/welcome/layout-preview.png24.90KB24.22KB▼ 2.75%
ui/assets/welcome/post-meta-simple.png28.99KB28.25KB▼ 2.53%
ui/assets/welcome/theme-options-simple.png39.36KB38.35KB▼ 2.57%
ui/assets/welcome/wysiwyg-fields.png9.92KB9.10KB▼ 8.29%
ui/assets/welcome/interface.png84.98KB83.63KB▼ 1.59%