84% lightweight-social-icons

Code Review | Lightweight Social Icons

WordPress plugin Lightweight Social Icons scored84%from 54 tests.

About plugin

  • Plugin page: lightweight-socia...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.4
  • WordPress version: 6.3.1
  • First release: Aug 20, 2014
  • Latest release: Mar 18, 2020
  • Number of updates: 38
  • Update frequency: every 62.1 days
  • Top authors: edge22 (100%)

Code review

54 tests

User reviews

63 reviews

Install metrics

50,000+ active /437,898 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.02ms] Passed 4 tests

Server-side resources used by Lightweight Social Icons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.41 ▼4.29
Dashboard /wp-admin3.32 ▲0.0147.33 ▼2.70
Posts /wp-admin/edit.php3.37 ▲0.0150.35 ▼1.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.04 ▼15.40
Media Library /wp-admin/upload.php3.24 ▲0.0138.78 ▲2.27

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_lsi_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lightweight Social Icons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.75 ▲0.441.97 ▲0.1445.27 ▼1.72
Dashboard /wp-admin2,189 ▲95.75 ▲0.0686.94 ▼7.8138.02 ▼7.48
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0335.58 ▼0.2834.38 ▼2.99
Add New Post /wp-admin/post-new.php1,526 ▼1917.70 ▼5.55695.56 ▲15.9557.38 ▼7.56
Media Library /wp-admin/upload.php1,403 ▲34.25 ▲0.03106.50 ▼2.4945.14 ▼4.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_lsi_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 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 add_action() in wp-content/plugins/lightweight-social-icons/lightweight-social-icons.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: social media, social icons, social profiles, social networking, social icon widget

lightweight-social-icons/lightweight-social-icons.php Passed 13 tests

The main PHP file in "Lightweight Social Icons" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
106 characters long description:
Add simple icon font social media buttons. Choose the order, colors, size and more for 42 different icons!

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
No dangerous file extensions were detected918 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP17755524
CSS2208273
SVG10083
JavaScript24138

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity66.00
▷ Minimum class complexity66.00
▷ Maximum class complexity66.00
Average method complexity11.83
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin