94% advanced-term-fields-colors

Code Review | Advanced Term Fields: Colors

WordPress plugin Advanced Term Fields: Colors scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-term-fie...
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.2
  • WordPress version: 5.8.1
  • First release: Feb 6, 2016
  • Latest release: Feb 13, 2016
  • Number of updates: 10
  • Update frequency: every 0.8 days
  • Top authors: dbmartin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 909 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by Advanced Term Fields: Colors
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1225.61 ▲7.75
Dashboard /wp-admin3.06 ▼0.0036.25 ▼5.01
Posts /wp-admin/edit.php3.11 ▲0.0038.11 ▲3.24
Add New Post /wp-admin/post-new.php5.42 ▼0.0272.40 ▼577.41
Media Library /wp-admin/upload.php3.00 ▲0.0025.49 ▼0.73

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Term Fields: Colors
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,691 ▲9016.02 ▲0.005.56 ▼0.2273.53 ▲2.91
Dashboard /wp-admin2,933 ▲346.09 ▼0.10112.79 ▼16.98171.88 ▲0.76
Posts /wp-admin/edit.php2,740 ▼03.24 ▲0.0163.86 ▲0.42138.30 ▲0.42
Add New Post /wp-admin/post-new.php3,743 ▲5218.82 ▲3.60417.17 ▼22.39164.28 ▲3.36
Media Library /wp-admin/upload.php1,752 ▼05.53 ▼0.03138.48 ▼14.05185.23 ▼1.45

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix 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 esc_attr() in wp-content/plugins/advanced-term-fields-colors/views/inner-quick-form-field.php:15
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/advanced-term-fields-colors/views/inner-edit-form-field.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/advanced-term-fields-colors/views/inner-add-form-field.php:15

User-side errors Passed 1 test

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


Plugin configuration 96% 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
7 plugin tags: colors, metadata, taxonomy, term_meta, term...

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

The main PHP script in "Advanced Term Fields: Colors" version 0.1.2 is automatically included on every request by WordPress
It is important 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin276 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.21
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions685.71%
▷ Anonymous functions114.29%
▷ Global constants2100.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
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-1.png29.72KB11.98KB▼ 59.68%