84% advanced-term-fields-icons

Code Review | Advanced Term Fields: Icons

WordPress plugin Advanced Term Fields: Icons scored84%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: 6.3.1
  • 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 /1,048 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Advanced Term Fields: Icons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.16 ▼3.77
Dashboard /wp-admin3.31 ▲0.0048.65 ▼0.34
Posts /wp-admin/edit.php3.36 ▲0.0050.66 ▲0.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.47 ▼3.62
Media Library /wp-admin/upload.php3.23 ▲0.0036.80 ▲0.14

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Term Fields: Icons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▲0.051.89 ▲0.2841.99 ▼4.81
Dashboard /wp-admin2,198 ▲245.58 ▼0.0689.86 ▼5.0241.13 ▼1.49
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0739.52 ▼3.2936.36 ▲2.24
Add New Post /wp-admin/post-new.php1,526 ▼023.35 ▼0.24625.63 ▲1.6763.59 ▲1.09
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.02100.11 ▼5.4645.52 ▲0.44

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > 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: 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-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 errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: metadata, taxonomy, term, termmeta, meta...

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

"Advanced Term Fields: Icons" version 0.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although 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
Everything looks great! No dangerous files found in this plugin637 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
There were no cyclomatic complexity issued detected
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

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%