90% block-for-font-awesome

Code Review | Block for Font Awesome

WordPress plugin Block for Font Awesome scored90%from 54 tests.

About plugin

  • Plugin page: block-for-font-aw...
  • Plugin version: 1.3.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Jul 6, 2019
  • Latest release: Oct 26, 2023
  • Number of updates: 32
  • Update frequency: every 49.2 days
  • Top authors: butterflymedia (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /13,478 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.72ms] Passed 4 tests

An overview of server-side resources used by Block for Font Awesome
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0736.31 ▼1.96
Dashboard /wp-admin3.38 ▲0.0747.99 ▼0.48
Posts /wp-admin/edit.php3.43 ▲0.0745.81 ▲0.11
Add New Post /wp-admin/post-new.php5.96 ▲0.0782.32 ▼12.53
Media Library /wp-admin/upload.php3.30 ▲0.0736.24 ▲0.25
Font Awesome /wp-admin/options-general.php?page=fa3.2729.62

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 14 new options
New WordPress options
fa_enqueue_fa6_be
widget_recent-comments
fa_enqueue_fe
fa_enqueue_kit
fa_enqueue_kit_be
widget_theysaidso_widget
fa_enqueue_fa6_source
widget_recent-posts
fa_enqueue_kit_fe
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for Block for Font Awesome
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲3414.72 ▲0.351.81 ▼0.3941.65 ▲0.34
Dashboard /wp-admin2,198 ▲215.74 ▲0.1283.83 ▼7.4736.67 ▼1.87
Posts /wp-admin/edit.php2,106 ▲61.99 ▲0.0232.94 ▼4.2733.04 ▼3.89
Add New Post /wp-admin/post-new.php6,367 ▲4,83927.82 ▲4.59866.45 ▲183.4061.90 ▲3.89
Media Library /wp-admin/upload.php1,406 ▲64.21 ▲0.0293.03 ▼7.1139.74 ▼4.83
Font Awesome /wp-admin/options-general.php?page=fa1,0122.0325.2147.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 14 options
    • fa_enqueue_fe
    • can_compress_scripts
    • fa_enqueue_fa6_be
    • fa_enqueue_be
    • widget_recent-comments
    • fa_enqueue_kit_be
    • theysaidso_admin_options
    • db_upgraded
    • fa_enqueue_fa6_fe
    • widget_theysaidso_widget
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Front-end icon blocks), #2 (Back-end icon blocks), #3 (Icon settings)
The official readme.txt is a good inspiration

block-for-font-awesome/block-for-font-awesome.php Passed 13 tests

Analyzing the main PHP file in "Block for Font Awesome" version 1.3.3
110 characters long description:
Display a Font Awesome 5, Font Awesome 6 or Font Awesome kit icon in a Gutenberg block or a custom HTML block.

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
There were no executable files found in this plugin568 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP27458274
JavaScript193141
CSS186108
XML17424
JSON10021

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.02MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png3.45KB3.65KB0.00%
screenshot-3.png6.91KB7.24KB0.00%
screenshot-1.png14.20KB15.40KB0.00%