66% bs-social-icons

Code Review | BS Social Icons

WordPress plugin BS Social Icons scored66%from 54 tests.

About plugin

  • Plugin page: bs-social-icons
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8
  • WordPress version: 6.3.1
  • First release: Aug 8, 2017
  • Latest release: Aug 8, 2017
  • Number of updates: 14
  • Update frequency: every 4.0 days
  • Top authors: bsquaresoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /846 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.44ms] Passed 4 tests

A check of server-side resources used by BS Social Icons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.01 ▲1.27
Dashboard /wp-admin3.32 ▲0.0250.64 ▲1.11
Posts /wp-admin/edit.php3.37 ▲0.0247.53 ▲1.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.73 ▼21.15
Media Library /wp-admin/upload.php3.25 ▲0.0241.20 ▲8.33
Settings & Instructions /wp-admin/admin.php?page=bsoft_social_option3.2132.92
All Icons /wp-admin/admin.php?page=bs-social3.2629.97

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
bsoft_redirect_name
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
bsoft_redirect_link
bsoft_image_attachment_id

Browser metrics Passed 4 tests

An overview of browser requirements for BS Social Icons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲18613.50 ▼0.789.62 ▲7.9142.04 ▼3.52
Dashboard /wp-admin2,215 ▲385.83 ▲0.1685.02 ▼3.9582.57 ▲37.42
Posts /wp-admin/edit.php2,135 ▲321.99 ▲0.0138.69 ▼0.6634.60 ▼6.44
Add New Post /wp-admin/post-new.php1,561 ▲3523.50 ▼0.15724.43 ▲66.8062.22 ▲10.91
Media Library /wp-admin/upload.php1,435 ▲384.17 ▼0.02101.68 ▲2.8970.18 ▲27.75
Settings & Instructions /wp-admin/admin.php?page=bsoft_social_option8271.6526.2225.21
All Icons /wp-admin/admin.php?page=bs-social1,1263.0241.1928.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=bs-social
    • > Warning in wp-content/plugins/bs-social-icons/templates/table.php+6
    sizeof(): Parameter must be an array or an object that implements Countable

SRP 0% 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/bs-social-icons/includes/class-bsoft-social-options.php
    • > /wp-content/plugins/bs-social-icons/bs_social_icons.php
    • > /wp-content/plugins/bs-social-icons/templates/table.php
    • > /wp-content/plugins/bs-social-icons/includes/class-commands.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/bs-social-icons/templates/bsoft-social-form-add.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bs-social-icons/templates/display_icon.php:23
    • > PHP Notice
      Undefined variable: extract_these in wp-content/plugins/bs-social-icons/templates/table.php on line 5
    • > PHP Notice
      Undefined variable: extract_these in wp-content/plugins/bs-social-icons/templates/table.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bs-social-icons/templates/table.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bs-social-icons/templates/table.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bs-social-icons/templates/table.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bs-social-icons/templates/table.php on line 4
    • > PHP Warning
      sizeof(): Parameter must be an array or an object that implements Countable in wp-content/plugins/bs-social-icons/templates/table.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bs-social-icons/templates/table.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bs-social
    • > Network (severe)
    wp-content/plugins/bs-social-icons//images/small_icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: You can look at the official readme.txt

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

The main PHP script in "BS Social Icons" version 0.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bs-social-icons.php" instead of "bs_social_icons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin652 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP781117407
JavaScript11339150
CSS13895

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.67
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/small_icon.PNG3.21KB0.43KB▼ 86.69%