74% tas2580-link-icons

Code Review | tas2580 Link Icons

WordPress plugin tas2580 Link Icons scored74%from 54 tests.

About plugin

  • Plugin page: tas2580-link-icons
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 14, 2016
  • Latest release: Sep 20, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tas2580 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /513 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.94MB] [CPU: ▼53.18ms] Passed 4 tests

Analyzing server-side resources used by tas2580 Link Icons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.425.26 ▼36.58
Dashboard /wp-admin2.06 ▼1.246.00 ▼42.48
Posts /wp-admin/edit.php2.06 ▼1.297.31 ▼39.97
Add New Post /wp-admin/post-new.php2.06 ▼3.825.73 ▼93.69
Media Library /wp-admin/upload.php2.06 ▼1.175.27 ▼27.27

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

tas2580 Link Icons: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲20113.69 ▼0.745.74 ▲3.6040.01 ▼5.43
Dashboard /wp-admin2,240 ▲525.01 ▼0.80109.21 ▼9.4040.73 ▼4.67
Posts /wp-admin/edit.php2,105 ▲132.05 ▲0.0041.98 ▲4.9335.66 ▼0.00
Add New Post /wp-admin/post-new.php1,405 ▼10921.35 ▲3.77567.26 ▼121.7352.50 ▼0.05
Media Library /wp-admin/upload.php1,395 ▲104.31 ▲0.0899.80 ▼6.4545.17 ▼0.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_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 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
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_enqueue_style() in wp-content/plugins/tas2580-link-icons/plugin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: link, content, icon

tas2580-link-icons/plugin.php 92% from 13 tests

The primary PHP file in "tas2580 Link Icons" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tas2580-link-icons.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin38 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS11030
JavaScript1005
PHP1293

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions0
▷ Named functions00.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
26 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/youtube-icon.png0.25KB0.25KB0.00%
icons/wordpress-icon.png0.49KB0.50KB0.00%
icons/linkedin-icon.png0.15KB0.15KB0.00%
icons/apple-icon.png0.31KB0.48KB0.00%
icons/pinterest-icon.png0.29KB0.30KB0.00%