84% incredible-font-awesome

Code Review | Incredible Font Awesome

WordPress plugin Incredible Font Awesome scored 84% from 54 tests.

About plugin

  • Plugin page: incredible-font-a...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-3.7.1
  • WordPress version: 5.8.1
  • First release: Dec 11, 2013
  • Latest release: Dec 12, 2013
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: massimo.serpilli (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 2,762 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
Install script ran successfully

Server metrics [RAM: ▼1.86MB] [CPU: ▼190.11ms] Passed 4 tests

A check of server-side resources used by Incredible Font Awesome
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.77 ▼1.064.90 ▼30.84
Dashboard /wp-admin1.79 ▼1.265.07 ▼42.55
Posts /wp-admin/edit.php1.79 ▼1.325.65 ▼38.68
Add New Post /wp-admin/post-new.php1.79 ▼3.648.11 ▼648.38
Media Library /wp-admin/upload.php1.79 ▼1.215.30 ▼25.62

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Incredible Font Awesome: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,687 ▲9115.94 ▲0.1910.30 ▲0.7346.14 ▲0.06
Dashboard /wp-admin2,977 ▲406.18 ▼0.01149.86 ▼4.74101.08 ▼9.37
Posts /wp-admin/edit.php2,743 ▲42.72 ▼0.0063.82 ▼2.4088.33 ▼0.25
Add New Post /wp-admin/post-new.php1,687 ▲418.76 ▲0.40384.80 ▼18.32107.51 ▼1.17
Media Library /wp-admin/upload.php1,810 ▲35.02 ▲0.00154.26 ▼0.60111.67 ▼19.87

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
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fontawesone-admin-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/incredible-font-awesome/fontawesome.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (A screenshot of the plugin in post.), #2 (A screenshot of the plugin example view icons in page)
The official readme.txt might help

incredible-font-awesome/fontawesome.php 92% from 13 tests

The primary PHP file in "Incredible Font Awesome" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("incredible-font-awesome.php" instead of "fontawesome.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected5,208 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript9448362,949
CSS384211,785
SVG100414
PHP1191060

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.17
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%
Functions5
▷ Named functions5100.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
10 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/cibuttons.png1.26KB0.94KB▼ 25.25%
js/vpibuttons.png1.08KB0.76KB▼ 29.74%
js/fcibuttons.png0.79KB0.60KB▼ 23.11%
js/waibuttons.png0.82KB0.66KB▼ 19.86%
js/sep.png0.97KB0.08KB▼ 91.74%