68% social-kit

Code Review | Social Kit

WordPress plugin Social Kit scored 68% from 54 tests.

About plugin

  • Plugin page: social-kit
  • Plugin version: 1.0.1
  • PHP compatiblity: 6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 5.9.2
  • First release: Jul 29, 2021
  • Latest release: Aug 11, 2021
  • Number of updates: 23
  • Update frequency: every 0.6 days
  • Top authors: dvizhenia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 224 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲4.40MB] [CPU: ▼280.14ms] Passed 4 tests

An overview of server-side resources used by Social Kit
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /8.38 ▲4.8779.03 ▲23.09
Dashboard /wp-admin8.40 ▲4.9959.97 ▲21.60
Posts /wp-admin/edit.php8.40 ▲4.7660.57 ▲19.54
Add New Post /wp-admin/post-new.php9.96 ▲2.99151.08 ▼1,175.78
Media Library /wp-admin/upload.php8.40 ▲5.1146.44 ▲14.08
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius8.4045.19

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 180 new files
Database: no new tables, 4 new options
New WordPress options
fs_debug_mode
fs_active_plugins
fs_gdpr
fs_accounts

Browser metrics Passed 4 tests

Social Kit: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,976 ▲22218.08 ▲2.6819.29 ▲12.642.64 ▲0.03
Dashboard /wp-admin2,953 ▲956.14 ▼0.08130.02 ▼8.62203.06 ▲40.57
Posts /wp-admin/edit.php2,760 ▲723.24 ▲0.0166.68 ▲3.08168.03 ▲29.42
Add New Post /wp-admin/post-new.php1,704 ▼1521.01 ▼1.73509.33 ▲103.06179.36 ▲19.00
Media Library /wp-admin/upload.php1,770 ▲725.51 ▲0.02144.02 ▼5.26204.13 ▲19.08
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius1,4522.4955.92149.44

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
    • > Notice in wp-content/plugins/social-kit/freemius/includes/class-freemius.php+8552
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 4 options in the database
    • fs_debug_mode
    • fs_gdpr
    • fs_active_plugins
    • fs_accounts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/social-kit/freemius/templates/ajax-loader.php
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/social-kit/widgets/call-button.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/social-kit/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/social-kit/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/social-kit/widgets/linkedin.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/social-kit/widgets/social-popup.php:4
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/social-kit/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/social-kit/widgets/social-bar.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/social-kit/freemius/templates/account/partials/addon.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-kit/admin/social-kit-options.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/social-kit/widgets/twitch-live.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 24 tag instead of maximum 10
The official readme.txt is a good inspiration

social-kit/social-kit.php Passed 13 tests

The main file in "Social Kit" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
24 characters long description:
Social Kit For Elementor

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected34,480 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
PHP1167,40416,19133,188
CSS143111810
JavaScript44159241
Markdown1680214
JSON10027

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity77.79
▷ Minimum class complexity1.00
▷ Maximum class complexity2,907.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes53
▷ Abstract classes23.77%
▷ Concrete classes5196.23%
▷ Final classes11.96%
Methods1,217
▷ Static methods17414.30%
▷ Public methods86571.08%
▷ Protected methods272.22%
▷ Private methods32526.71%
Functions100
▷ Named functions100100.00%
▷ Anonymous functions00.00%
Constants128
▷ Global constants10078.12%
▷ Class constants2821.88%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/social-kit.png18.05KB6.12KB▼ 66.07%