68% responsive-facebook-and-twitter-widget

Code Review | Responsive Social Slider Widget

WordPress plugin Responsive Social Slider Widget scored 68% from 54 tests.

About plugin

  • Plugin page: responsive-facebo...
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6.1
  • WordPress version: 5.9.2
  • First release: Jun 30, 2017
  • Latest release: Feb 15, 2021
  • Number of updates: 66
  • Update frequency: every 20.1 days
  • Top authors: Frostbourn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 7,232 total downloads

Benchmarks

Plugin footprint 65% 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: ▲4.42MB] [CPU: ▼275.67ms] 75% from 4 tests

A check of server-side resources used by Responsive Social Slider Widget
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,785.55ms on /wp-admin/options-general.php?page=responsive-facebook-and-twitter-widget)
PageMemory (MB)CPU Time (ms)
Home /8.40 ▲4.8976.91 ▲22.97
Dashboard /wp-admin8.42 ▲5.0158.66 ▲20.38
Posts /wp-admin/edit.php8.42 ▲4.7858.15 ▲19.98
Add New Post /wp-admin/post-new.php9.99 ▲3.01111.96 ▼1,162.25
Media Library /wp-admin/upload.php8.42 ▲5.1244.07 ▲19.20
Responsive Social Slider Widget /wp-admin/options-general.php?page=responsive-facebook-and-twitter-widget8.421,785.55
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius8.4243.36

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 170 new files
Database: no new tables, 4 new options
New WordPress options
fs_gdpr
fs_debug_mode
fs_accounts
fs_active_plugins

Browser metrics Passed 4 tests

An overview of browser requirements for Responsive Social Slider Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,809 ▲5515.95 ▲0.285.86 ▼0.112.50 ▲0.01
Dashboard /wp-admin2,925 ▲646.15 ▼0.05117.44 ▼21.46170.87 ▲7.03
Posts /wp-admin/edit.php2,724 ▲363.23 ▼0.0163.14 ▼2.12154.41 ▲14.92
Add New Post /wp-admin/post-new.php1,671 ▼1921.96 ▲1.15411.92 ▼30.50155.22 ▼4.61
Media Library /wp-admin/upload.php1,731 ▲335.45 ▼0.03152.72 ▲10.61203.11 ▲21.28
Responsive Social Slider Widget /wp-admin/options-general.php?page=responsive-facebook-and-twitter-widget1,2872.4553.40159.71
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius1,4582.5055.02114.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/responsive-facebook-and-twitter-widget/freemius/includes/class-freemius.php+8540
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 4 options in the database
    • fs_gdpr
    • fs_accounts
    • fs_active_plugins
    • fs_debug_mode

Smoke tests 50% 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 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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/responsive-facebook-and-twitter-widget/freemius/templates/ajax-loader.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/responsive-facebook-and-twitter-widget/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/responsive-facebook-and-twitter-widget/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/responsive-facebook-and-twitter-widget/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/responsive-facebook-and-twitter-widget/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/responsive-facebook-and-twitter-widget/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/responsive-facebook-and-twitter-widget/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/responsive-facebook-and-twitter-widget/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/responsive-facebook-and-twitter-widget/freemius/templates/account/partials/addon.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention: You can take inspiration from this readme.txt

responsive-facebook-and-twitter-widget/responsive-facebook-and-twitter-widget.php Passed 13 tests

The main PHP script in "Responsive Social Slider Widget" version 1.5.3 is automatically included on every request by WordPress
119 characters long description:
Display Facebook and Twitter on your website in beautiful responsive box which slides in from page edge in a handy way!

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin31,520 lines of code in 127 files:
LanguageFilesBlank linesComment linesLines of code
PHP1097,26616,06930,659
Sass1840411
Markdown1680214
JavaScript33459194
JSON10027
CSS120015

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,895)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity89.93
▷ Minimum class complexity1.00
▷ Maximum class complexity2,895.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes24.44%
▷ Concrete classes4395.56%
▷ Final classes00.00%
Methods1,133
▷ Static methods17315.27%
▷ Public methods79169.81%
▷ Protected methods151.32%
▷ Private methods32728.86%
Functions100
▷ Named functions100100.00%
▷ Anonymous functions00.00%
Constants123
▷ Global constants9879.67%
▷ Class constants2520.33%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/responsive-facebook-and-twitter-widget.png13.49KB4.53KB▼ 66.40%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%