73% font-awesome-field

Code Review | Font Awesome Field

WordPress plugin Font Awesome Field scored73%from 54 tests.

About plugin

  • Plugin page: font-awesome-field
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0.1
  • WordPress version: 6.3.1
  • First release: Aug 13, 2014
  • Latest release: Nov 27, 2014
  • Number of updates: 4
  • Update frequency: every 27.0 days
  • Top authors: tormorten (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,539 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.82MB] [CPU: ▼54.69ms] Passed 4 tests

A check of server-side resources used by Font Awesome Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.26 ▼34.28
Dashboard /wp-admin2.20 ▼1.157.94 ▼52.85
Posts /wp-admin/edit.php2.20 ▼1.166.17 ▼39.96
Add New Post /wp-admin/post-new.php2.20 ▼3.696.57 ▼91.66
Media Library /wp-admin/upload.php2.20 ▼1.035.67 ▼28.26

Server storage [IO: ▲0.75MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
fa_icons
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Font Awesome Field
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /8,072 ▲5,32614.40 ▲0.121.80 ▲0.2141.60 ▲0.28
Dashboard /wp-admin7,473 ▲5,2925.73 ▼0.01107.97 ▲10.2038.29 ▼1.40
Posts /wp-admin/edit.php7,390 ▲5,2902.11 ▲0.1540.04 ▲4.5530.57 ▼3.70
Add New Post /wp-admin/post-new.php11,531 ▲10,00326.04 ▲3.04879.19 ▲257.9759.55 ▲7.76
Media Library /wp-admin/upload.php6,690 ▲5,2874.56 ▲0.39101.49 ▼1.2540.30 ▼2.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Font_Awesome_Field::instance() should not be called statically
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • fa_icons

Smoke tests 75% 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 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/font-awesome-field/font-awesome-field.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

font-awesome-field/font-awesome-field.php 77% from 13 tests

The main file in "Font Awesome Field" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages/")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
No dangerous file extensions were detected5,062 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
CSS31121,755
Sass1426241,349
LESS1323331,247
SVG100520
PHP221159161
JavaScript217030

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
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
PNG images were not found in this plugin