10% font-awesome-menus

Code Review | Font Awesome Menus

WordPress plugin Font Awesome Menus scored10%from 54 tests.

About plugin

  • Plugin page: font-awesome-menus
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 23, 2013
  • Latest release: Dec 4, 2013
  • Number of updates: 9
  • Update frequency: every 21.7 days
  • Top authors: New Nine (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /7,321 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.70ms] Passed 4 tests

A check of server-side resources used by Font Awesome Menus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.433.74 ▼40.23
Dashboard /wp-admin2.05 ▼1.265.98 ▼41.69
Posts /wp-admin/edit.php2.05 ▼1.316.17 ▼40.85
Add New Post /wp-admin/post-new.php2.05 ▼3.845.46 ▼100.03
Media Library /wp-admin/upload.php2.05 ▼1.185.15 ▼27.93
Font Awesome Menus /wp-admin/options-general.php?page=fontawesome-menus2.054.99

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
n9m-fontawesome
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Font Awesome Menus: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.32 ▼1.051.71 ▼0.3042.97 ▼3.31
Dashboard /wp-admin2,213 ▲255.85 ▲0.77102.33 ▼3.4838.08 ▼5.54
Posts /wp-admin/edit.php2,093 ▲42.17 ▲0.1739.98 ▼3.7035.69 ▼0.48
Add New Post /wp-admin/post-new.php1,538 ▲523.21 ▲0.12703.38 ▲58.9651.49 ▼7.38
Media Library /wp-admin/upload.php1,392 ▲14.23 ▲0.0493.80 ▼4.1240.59 ▼3.85
Font Awesome Menus /wp-admin/options-general.php?page=fontawesome-menus8232.0324.1024.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • n9m-fontawesome
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=fontawesome-menus
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/options-general.php?page=fontawesome-menus
    • > Notice in wp-content/plugins/font-awesome-menus/font-awesome-menus.php+42
    Undefined index: tab
    • > GET request to /wp-admin/options-general.php?page=fontawesome-menus
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/font-awesome-menus/font-awesome-menus.php:206

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: wp_nav_menu, nav menu, navigation, menus, responsive...

font-awesome-menus/font-awesome-menus.php 92% from 13 tests

The main PHP file in "Font Awesome Menus" ver. 3.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 167 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected3,974 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS40703,382
SVG100399
PHP1419193

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin