84% social-icons

Code Review | Social Icons

WordPress plugin Social Icons scored84%from 54 tests.

About plugin

  • Plugin page: social-icons
  • Plugin version: 1.7.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Dec 14, 2015
  • Latest release: Feb 8, 2021
  • Number of updates: 19
  • Update frequency: every 99.4 days
  • Top authors: ThemeGrill (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

20,000+ active /323,405 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
Install script ran successfully

Server metrics [RAM: ▲0.54MB] [CPU: ▲1.90ms] Passed 4 tests

Server-side resources used by Social Icons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4240.05 ▼2.19
Dashboard /wp-admin3.92 ▲0.6152.07 ▼0.40
Posts /wp-admin/edit.php3.97 ▲0.6154.75 ▲5.92
Add New Post /wp-admin/post-new.php6.46 ▲0.57102.41 ▲10.54
Media Library /wp-admin/upload.php3.78 ▲0.5542.02 ▲4.28
Social Icons /wp-admin/edit.php?post_type=social_icon3.8341.50

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 55 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_themegrill_social_icons
social_icons_meta_box_errors
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Social Icons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9314.47 ▲0.092.02 ▲0.2241.72 ▼2.41
Dashboard /wp-admin2,233 ▲305.03 ▼0.78100.83 ▼5.9939.13 ▼4.28
Posts /wp-admin/edit.php2,106 ▲32.04 ▼0.0140.36 ▲5.4135.96 ▲0.17
Add New Post /wp-admin/post-new.php1,534 ▼1117.73 ▼5.94614.62 ▼13.9160.14 ▲8.35
Media Library /wp-admin/upload.php1,409 ▲124.16 ▼0.10115.72 ▲17.7744.29 ▲2.87
Social Icons /wp-admin/edit.php?post_type=social_icon1,1192.3142.7931.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_themegrill_social_icons
    • theysaidso_admin_options
    • widget_recent-posts
    • social_icons_meta_box_errors
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-icons/includes/abstracts/abstract-si-widget.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/social-icons/includes/admin/meta-boxes/views/html-group-social-icon.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

social-icons/social-icons.php 92% from 13 tests

The main file in "Social Icons" v. 1.7.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 289 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin10,715 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
JSON1004,832
PHP224088642,848
Sass740802,403
JavaScript105045351
SVG201275
CSS6006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity11.53
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes17.14%
Methods82
▷ Static methods2429.27%
▷ Public methods6882.93%
▷ Protected methods11.22%
▷ Private methods1315.85%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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 were not PNG files found in your plugin