94% advanced-term-fields-icons

Code Review | Advanced Term Fields: Icons

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

About plugin

  • Plugin page: advanced-term-fie...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.1
  • WordPress version: 5.9.2
  • First release: Feb 13, 2016
  • Latest release: Feb 13, 2016
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: dbmartin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 838 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼295.22ms] Passed 4 tests

An overview of server-side resources used by Advanced Term Fields: Icons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.4052.94 ▲25.05
Dashboard /wp-admin3.41 ▲0.0032.85 ▼0.24
Posts /wp-admin/edit.php3.64 ▲0.0037.72 ▲0.79
Add New Post /wp-admin/post-new.php6.88 ▼0.0990.09 ▼1,181.54
Media Library /wp-admin/upload.php3.29 ▲0.0023.94 ▲0.12

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Term Fields: Icons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲3915.89 ▲0.215.73 ▼1.432.34 ▲0.24
Dashboard /wp-admin2,888 ▲276.10 ▼0.15114.79 ▼23.21154.63 ▼6.33
Posts /wp-admin/edit.php2,688 ▼03.25 ▲0.0064.70 ▼0.50143.16 ▼2.95
Add New Post /wp-admin/post-new.php1,661 ▼11216.05 ▼4.97415.54 ▼57.97155.05 ▼3.36
Media Library /wp-admin/upload.php1,692 ▼65.49 ▼0.01153.24 ▲12.37182.88 ▼2.92

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
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/advanced-term-fields-icons/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-icons/views/inner-quick-form-field.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/advanced-term-fields-icons/views/inner-add-form-field.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: taxonomy, meta, term, termmeta, metadata...

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

The primary PHP file in "Advanced Term Fields: Icons" version 0.1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • 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 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected637 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22316332
PHP698375213
CSS21063
Markdown121029

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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%