84% advanced-term-fields

Code Review | Advanced Term Fields

WordPress plugin Advanced Term Fields scored 84% from 54 tests.

About plugin

  • Plugin page: advanced-term-fields
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5
  • WordPress version: 5.9.2
  • First release: Feb 5, 2016
  • Latest release: Apr 10, 2016
  • Number of updates: 7
  • Update frequency: every 9.3 days
  • Top authors: dbmartin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,391 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼301.81ms] Passed 4 tests

A check of server-side resources used by Advanced Term Fields
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1652.06 ▲2.98
Dashboard /wp-admin3.50 ▲0.0933.12 ▲0.07
Posts /wp-admin/edit.php3.73 ▲0.0937.69 ▼0.45
Add New Post /wp-admin/post-new.php6.99 ▼0.0092.44 ▼1,209.04
Media Library /wp-admin/upload.php3.38 ▲0.0925.84 ▲2.18

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

Advanced Term Fields: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5316.29 ▲0.256.20 ▼0.232.79 ▲0.48
Dashboard /wp-admin2,895 ▲346.14 ▼0.03120.24 ▼17.50157.51 ▼12.86
Posts /wp-admin/edit.php2,694 ▲33.23 ▼0.0163.62 ▲0.62140.24 ▼3.86
Add New Post /wp-admin/post-new.php1,752 ▼421.47 ▲4.26422.18 ▲27.09162.90 ▲11.23
Media Library /wp-admin/upload.php1,701 ▲35.55 ▲0.03141.36 ▲3.36185.67 ▲0.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • atf_core_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-term-fields/inc/functions.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/advanced-term-fields/views/add-form-field.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/advanced-term-fields/views/edit-form-field.php:16
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/advanced-term-fields/views/quick-form-field.php:16

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)
There were no browser issues found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: term, metadata, termmeta, term_meta, taxonomy...

advanced-term-fields/advanced-term-fields.php 92% from 13 tests

The entry point to "Advanced Term Fields" version 0.1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin497 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity24.00
▷ Minimum class complexity6.00
▷ Maximum class complexity42.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
▷ Static methods716.67%
▷ Public methods3890.48%
▷ Protected methods12.38%
▷ Private methods37.14%
▷ Named functions125.00%
▷ Anonymous functions375.00%
▷ Global constants2100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot.png29.72KB11.98KB▼ 59.68%