78% advanced-custom-fields-font-awesome

Code Review | Advanced Custom Fields: Font Awesome Field

WordPress plugin Advanced Custom Fields: Font Awesome Field scored78%from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 4.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2014
  • Latest release: Aug 8, 2023
  • Number of updates: 104
  • Update frequency: every 33.3 days
  • Top authors: mattkeys (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

100,000+ active /1,014,858 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.07ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Custom Fields: Font Awesome Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.59 ▼3.47
Dashboard /wp-admin3.34 ▼0.0147.96 ▼20.04
Posts /wp-admin/edit.php3.39 ▲0.0348.69 ▼2.09
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.49 ▼14.67
Media Library /wp-admin/upload.php3.26 ▲0.0337.21 ▲1.03

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields: Font Awesome Field
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.28 ▼0.082.05 ▼0.1242.85 ▲3.55
Dashboard /wp-admin2,189 ▲125.64 ▼0.0497.70 ▲1.8641.92 ▲2.46
Posts /wp-admin/edit.php2,100 ▼32.06 ▲0.0440.13 ▲2.1235.30 ▼2.77
Add New Post /wp-admin/post-new.php1,540 ▲1422.96 ▲5.11650.72 ▼33.7755.58 ▼2.14
Media Library /wp-admin/upload.php1,403 ▲94.23 ▲0.0194.95 ▼15.5443.36 ▼2.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/advanced-custom-fields-font-awesome/assets/js/templates/tmpl-fa-kit.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-font-awesome/admin/class-ACFFA-Admin.php:956

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: The official readme.txt might help

advanced-custom-fields-font-awesome/acf-font-awesome.php 92% from 13 tests

"Advanced Custom Fields: Font Awesome Field" version 4.0.6'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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-custom-fields-font-awesome.php" instead of "acf-font-awesome.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected68,030 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
YAML20062,969
PHP106703263,315
JavaScript6222401,173
CSS42911307
Markdown3770266

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity89.75
▷ Minimum class complexity31.00
▷ Maximum class complexity257.00
Average method complexity6.07
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods140
▷ Static methods107.14%
▷ Public methods7855.71%
▷ Protected methods00.00%
▷ Private methods6244.29%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants1191.67%
▷ Class constants18.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/inc/multi-select/switch.png0.53KB0.64KB0.00%