84% link-icons

Code Review | Link Icons

WordPress plugin Link Icons scored 84% from 54 tests.

About plugin

  • Plugin page: link-icons
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.8.1
  • First release: May 2, 2013
  • Latest release: May 4, 2013
  • Number of updates: 10
  • Update frequency: every 0.2 days
  • Top authors: bergh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,892 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: ▼1.84MB] [CPU: ▼201.05ms] Passed 4 tests

Analyzing server-side resources used by Link Icons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.79 ▼0.937.94 ▼18.76
Dashboard /wp-admin1.80 ▼1.255.90 ▼56.99
Posts /wp-admin/edit.php1.81 ▼1.305.61 ▼45.69
Add New Post /wp-admin/post-new.php1.80 ▼3.635.58 ▼668.64
Media Library /wp-admin/upload.php1.80 ▼1.206.05 ▼32.89

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Link Icons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,834 ▲26216.53 ▲0.9115.68 ▲4.3247.66 ▼5.87
Dashboard /wp-admin2,989 ▲555.91 ▼0.06157.90 ▼8.24120.39 ▼12.29
Posts /wp-admin/edit.php2,761 ▲222.71 ▼0.0071.75 ▼2.1599.06 ▲6.56
Add New Post /wp-admin/post-new.php1,630 ▲4920.99 ▲3.52325.73 ▼121.44119.03 ▼4.42
Media Library /wp-admin/upload.php1,829 ▲225.02 ▼0.01184.58 ▼9.35119.65 ▼10.19

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
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the link-icons-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_register_style() in wp-content/plugins/link-icons/link-icon.php:14

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI ("")
The official readme.txt might help

link-icons/link-icon.php 92% from 13 tests

"Link Icons" version 0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("link-icons.php" instead of "link-icon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin215 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34227200
CSS12015

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/link-icon-external.png1.12KB0.19KB▼ 83.13%
images/link-icon-image.png1.03KB0.12KB▼ 88.66%
images/link-icon-video.png1.04KB0.12KB▼ 88.42%