84% icon

Code Review | Web Icons

WordPress plugin Web Icons scored84%from 54 tests.

About plugin

  • Plugin page: icon
  • Plugin version: 1.0.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: Sep 3, 2016
  • Latest release: Aug 9, 2023
  • Number of updates: 56
  • Update frequency: every 45.2 days
  • Top authors: GhozyLab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /25,484 total downloads

Benchmarks

Plugin footprint 82% 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: ▲1.32MB] [CPU: ▲1.48ms] 75% from 4 tests

This is a short check of server-side resources used by Web Icons
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 509.34ms on /wp-admin/admin.php?page=icon-plugin)
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0342.39 ▲1.51
Dashboard /wp-admin5.05 ▲1.7451.08 ▼1.82
Posts /wp-admin/edit.php5.16 ▲1.8053.62 ▲3.73
Add New Post /wp-admin/post-new.php7.67 ▲1.78102.24 ▲2.50
Media Library /wp-admin/upload.php4.97 ▲1.7447.72 ▲5.30
Help /wp-admin/admin.php?page=icon-welcome4.9335.68
Dashboard /wp-admin/admin.php?page=icon-plugin4.97509.34

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 98 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Web Icons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,083 ▲33713.34 ▼0.934.57 ▲2.5643.04 ▼2.06
Dashboard /wp-admin2,492 ▲3015.87 ▼0.03106.07 ▼2.1670.50 ▲26.78
Posts /wp-admin/edit.php2,372 ▲3041.99 ▼0.0538.20 ▲2.3636.58 ▲0.69
Add New Post /wp-admin/post-new.php1,843 ▲30123.42 ▲4.90744.17 ▲99.3936.08 ▼18.25
Media Library /wp-admin/upload.php1,665 ▲2744.24 ▼0.0598.19 ▼0.4572.50 ▲29.28
Help /wp-admin/admin.php?page=icon-welcome1,0822.0326.2742.95
Dashboard /wp-admin/admin.php?page=icon-plugin1,6062.2125.2550.16

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 15× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/icon/inc/admin/functions/helpers.php
    • > /wp-content/plugins/icon/inc/frontend/icon-script.php
    • > /wp-content/plugins/icon/inc/admin/assets/icons/icon-justvector.php
    • > /wp-content/plugins/icon/inc/admin/assets/icons/icon-material-icons.php
    • > /wp-content/plugins/icon/inc/admin/iconpicker.php
    • > /wp-content/plugins/icon/inc/admin/assets/icons/icon-fontello.php
    • > /wp-content/plugins/icon/inc/frontend/icon-shortcode.php
    • > /wp-content/plugins/icon/inc/admin/assets/icons/icon-openiconic.php
    • > /wp-content/plugins/icon/inc/admin/assets/icons/icon-paymentfont.php
    • > /wp-content/plugins/icon/inc/admin/functions/icon-functions.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

icon/icon.php Passed 13 tests

"Web Icons" version 1.0.0.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
121 characters long description:
Icon - Display icon anywhere you like. You can quickly customize any icons to look exactly the way you want them to look.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin33,601 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
JSON20012,924
PHP152837411,909
CSS212051064,660
SVG7063,316
PO File5120124466
JavaScript314533326

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
7 PNG files occupy 0.19MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/admin/assets/img/how-to-edit.png83.28KB25.61KB▼ 69.24%
inc/admin/tinymce-plugin/wpicons/images/icon-picker.png3.65KB1.07KB▼ 70.53%
inc/admin/assets/img/icon-picker.png3.65KB1.07KB▼ 70.53%
inc/admin/assets/img/pro_only.png3.27KB0.61KB▼ 81.43%
inc/admin/assets/img/most_popular.png9.79KB2.77KB▼ 71.66%