68% easy-font-icons

Code Review | Easy Font Icons

WordPress plugin Easy Font Icons scored68%from 54 tests.

About plugin

  • Plugin page: easy-font-icons
  • Plugin version: 1.0.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-3.5.2
  • WordPress version: 6.3.1
  • First release: Jun 26, 2013
  • Latest release: Jul 2, 2013
  • Number of updates: 22
  • Update frequency: every 0.3 days
  • Top authors: leonmagee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,813 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
This plugin's installer ran successfully

Server metrics [RAM: ▼1.21MB] [CPU: ▼44.15ms] Passed 4 tests

An overview of server-side resources used by Easy Font Icons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.76 ▼0.7113.90 ▼31.46
Dashboard /wp-admin2.80 ▼0.5117.76 ▼31.06
Posts /wp-admin/edit.php2.80 ▼0.5616.66 ▼32.93
Add New Post /wp-admin/post-new.php2.80 ▼3.0919.47 ▼81.13
Media Library /wp-admin/upload.php2.80 ▼0.4317.25 ▼18.08
Easy Font Icons /wp-admin/options-general.php?page=efi-settings-main2.8018.45

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Font Icons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.24 ▼0.121.62 ▼0.1244.04 ▲6.53
Dashboard /wp-admin2,208 ▲285.54 ▼0.1084.54 ▼2.8041.47 ▼4.86
Posts /wp-admin/edit.php2,113 ▲132.03 ▲0.0135.24 ▼0.9937.72 ▲2.27
Add New Post /wp-admin/post-new.php1,546 ▲2018.17 ▼4.94613.64 ▼62.8067.26 ▲9.71
Media Library /wp-admin/upload.php1,410 ▲104.16 ▼0.0595.94 ▼17.6342.52 ▼5.47
Easy Font Icons /wp-admin/options-general.php?page=efi-settings-main8622.0423.7128.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/easy-font-icons/lib/mm-easy-font-icons.php+36
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=efi-settings-main
    • > Notice in wp-content/plugins/easy-font-icons/lib/mm-easy-font-icons.php+40
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=efi-settings-main
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=efi-settings-main
    • > 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-font-icons/index.php:37
    • > PHP Notice
      Undefined variable: current_font in wp-content/plugins/easy-font-icons/views/efi-meta-box.php on line 45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function selected() in wp-content/plugins/easy-font-icons/views/efi-meta-box.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/easy-font-icons/views/efi-settings-page.php:11
    • > PHP Notice
      Undefined variable: current_icon in wp-content/plugins/easy-font-icons/views/efi-meta-box.php on line 45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/easy-font-icons/views/efi-settings-page-old.php:17
    • > PHP Notice
      Undefined variable: current_font in wp-content/plugins/easy-font-icons/views/efi-meta-box.php on line 37
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/easy-font-icons/views/efi-meta-box.php on line 45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-font-icons/lib/old-functions.php:74
    • > PHP Notice
      Undefined variable: current_icon in wp-content/plugins/easy-font-icons/views/efi-meta-box.php on line 39

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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:
  • Screenshots: Add an image for screenshot #1 (Custom Meta Box screenshot-1.png.)
Please take inspiration from this readme.txt

easy-font-icons/index.php 92% from 13 tests

Analyzing the main PHP file in "Easy Font Icons" version 1.0.12
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-font-icons.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,172 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
SVG500563
PHP841291425
CSS22914169
JavaScript118815

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods18100.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png146.54KB64.36KB▼ 56.08%