10% g-social-icons

Code Review | G Social Icons

WordPress plugin G Social Icons scored10%from 54 tests.

About plugin

  • Plugin page: g-social-icons
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 23, 2015
  • Latest release: Feb 1, 2015
  • Number of updates: 13
  • Update frequency: every 0.9 days
  • Top authors: gerbenvanamstel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,455 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/g-social-icons/g-social-icons.php+55
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼55.21ms] Passed 4 tests

A check of server-side resources used by G Social Icons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.85 ▼31.47
Dashboard /wp-admin2.05 ▼1.305.43 ▼52.93
Posts /wp-admin/edit.php2.05 ▼1.315.43 ▼42.91
Add New Post /wp-admin/post-new.php2.05 ▼3.845.19 ▼93.53
Media Library /wp-admin/upload.php2.05 ▼1.185.19 ▼28.19
G Social Icons /wp-admin/options-general.php?page=g-social-icons2.056.24

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

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

Browser metrics Passed 4 tests

Checking browser requirements for G Social Icons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.61 ▼0.985.69 ▲3.8842.88 ▼1.01
Dashboard /wp-admin2,204 ▲165.85 ▲0.93106.40 ▲3.9140.22 ▼3.45
Posts /wp-admin/edit.php2,090 ▼21.97 ▼0.1234.06 ▼7.5734.32 ▼1.36
Add New Post /wp-admin/post-new.php1,536 ▲323.45 ▲0.24673.23 ▲62.8663.06 ▼3.25
Media Library /wp-admin/upload.php1,392 ▲44.13 ▼0.10104.55 ▲3.3146.30 ▲1.10
G Social Icons /wp-admin/options-general.php?page=g-social-icons1,1662.0622.7333.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/g-social-icons/g-social-icons.php+55
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_g-social-icons-widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=g-social-icons
    • > Deprecated in wp-content/plugins/g-social-icons/g-social-icons.php+55
    Function create_function() is deprecated

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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/g-social-icons/public/class-g-social-icons-widget.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/g-social-icons/admin/views/admin.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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: icons, media, social

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

The entry point to "G Social Icons" version 1.2.0 is a PHP file that has certain tags in its header comment area
33 characters long description:
Easily display social media icons

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
There were no executable files found in this plugin722 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP775285409
SVG15015246
Markdown16028
JavaScript110422
CSS14017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity10.33
▷ Minimum class complexity2.00
▷ Maximum class complexity25.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin