84% manager-for-icomoon

Code Review | Manager for Icomoon

WordPress plugin Manager for Icomoon scored 84% from 54 tests.

About plugin

  • Plugin page: manager-for-icomoon
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.4-5.8.2
  • WordPress version: 5.9.2
  • First release: Aug 23, 2019
  • Latest release: Nov 29, 2021
  • Number of updates: 33
  • Update frequency: every 26.0 days
  • Top authors: albedo0 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active / 2,907 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.20MB] [CPU: ▼294.58ms] Passed 4 tests

An overview of server-side resources used by Manager for Icomoon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1854.47 ▲3.79
Dashboard /wp-admin3.64 ▲0.2335.65 ▲2.76
Posts /wp-admin/edit.php3.87 ▲0.2340.25 ▲1.12
Add New Post /wp-admin/post-new.php7.15 ▲0.1792.56 ▼1,183.94
Media Library /wp-admin/upload.php3.58 ▲0.2926.20 ▲1.76
Icon list /wp-admin/admin.php?page=managerforicomoon-icons5.7432.95
Welcome /wp-admin/admin.php?page=managerforicomoon5.7427.99
Upload /wp-admin/admin.php?page=managerforicomoon-zip5.7428.88
Settings /wp-admin/admin.php?page=managerforicomoon-settings5.7475.06
Shortcode /wp-admin/admin.php?page=managerforicomoon-shortcode5.7440.93

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 41 new files
Database: no new tables, 1 new option
New WordPress options
managerforicomoon_options

Browser metrics Passed 4 tests

An overview of browser requirements for Manager for Icomoon
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,039 ▲28522.40 ▲6.746.72 ▲0.612.70 ▲0.02
Dashboard /wp-admin3,130 ▲27612.04 ▲5.71254.09 ▲112.67192.21 ▲28.66
Posts /wp-admin/edit.php2,957 ▲26911.01 ▲7.77115.83 ▲53.83156.39 ▲11.66
Add New Post /wp-admin/post-new.php1,726 ▲1516.06 ▼5.49309.15 ▼149.01157.25 ▲2.79
Media Library /wp-admin/upload.php1,957 ▲25912.93 ▲7.41169.75 ▲24.99205.69 ▲17.29
Icon list /wp-admin/admin.php?page=managerforicomoon-icons16,55710.31123.26269.24
Welcome /wp-admin/admin.php?page=managerforicomoon1,38410.10108.50167.04
Upload /wp-admin/admin.php?page=managerforicomoon-zip1,44010.18108.98193.60
Settings /wp-admin/admin.php?page=managerforicomoon-settings1,46610.11112.64184.50
Shortcode /wp-admin/admin.php?page=managerforicomoon-shortcode1,44410.05111.30192.32

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • managerforicomoon_options

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function managerForIcomoon\\__() in wp-content/plugins/manager-for-icomoon/html/page.shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/manager-for-icomoon/html/page.home.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function managerForIcomoon\\settings_fields() in wp-content/plugins/manager-for-icomoon/html/page.settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/manager-for-icomoon/html/page.zip.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/manager-for-icomoon/html/page.icons.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/manager-for-icomoon/html/page.modal.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function managerForIcomoon\\plugin_dir_path() in wp-content/plugins/manager-for-icomoon/managerforicomoon.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: manager, icon, font, icomoon

manager-for-icomoon/managerforicomoon.php 85% from 13 tests

The main PHP file in "Manager for Icomoon" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("manager-for-icomoon.php" instead of "managerforicomoon.php")

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 plugin11,359 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
HTML1226,908
CSS5100542,092
PHP1621174978
SVG100501
Sass31010471
PO File194127239
JavaScript3210169
JSON1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.90
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods59
▷ Static methods2135.59%
▷ Public methods5796.61%
▷ Protected methods00.00%
▷ Private methods23.39%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants15
▷ Global constants15100.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 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo-manager-for-icomoon.png52.60KB20.00KB▼ 61.99%
img/logo_small.png1.18KB0.56KB▼ 52.44%
img/logo.png6.96KB2.96KB▼ 57.43%