79% nm-font-awesome

Code Review | NM Font Awesome

WordPress plugin NM Font Awesome scored 79% from 54 tests.

About plugin

  • Plugin page: nm-font-awesome
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 23, 2018
  • Latest release: Jan 18, 2019
  • Number of updates: 17
  • Update frequency: every 17.7 days
  • Top authors: nykoliuk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,764 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by NM Font Awesome
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.84 ▲0.41
Dashboard /wp-admin3.32 ▲0.0245.96 ▼3.77
Posts /wp-admin/edit.php3.37 ▲0.0244.45 ▲0.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.57 ▲1.68
Media Library /wp-admin/upload.php3.24 ▲0.0238.33 ▲5.89

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for NM Font Awesome
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲10415.84 ▲1.2614.40 ▲12.6242.61 ▲4.66
Dashboard /wp-admin2,209 ▲215.86 ▲0.96107.09 ▼2.3939.86 ▼0.40
Posts /wp-admin/edit.php2,095 ▲62.01 ▼0.0040.69 ▲4.4836.60 ▲3.15
Add New Post /wp-admin/post-new.php1,520 ▼1422.96 ▼0.14653.88 ▼82.2262.34 ▲4.92
Media Library /wp-admin/upload.php1,397 ▲94.21 ▼0.08108.93 ▼0.3549.10 ▲0.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/nm-font-awesome/includes/nm-font-awesome-shortcode.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant NM_FONTAWESOME_MSG - assumed 'NM_FONTAWESOME_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/nm-font-awesome/includes/nm-font-awesome-shortcode.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nm-font-awesome/nm-font-awesome.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nm-font-awesome/includes/nm-font-awesome-init.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: fontawesome, font, icon, font awesome, icons

nm-font-awesome/nm-font-awesome.php Passed 13 tests

The principal PHP file in "NM Font Awesome" v. 1.0.5 is loaded by WordPress automatically on each request
92 characters long description:
Wordpress plugin that adds the latest version 5 of Font Awesome into your WordPress project.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin46,864 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JSON10046,719
JavaScript27462
PHP3192057
CSS10026

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/background.png59.04KB30.30KB▼ 48.68%
public/images/menu-icon.png1.78KB0.44KB▼ 75.43%