10% spider-facebook

Code Review | WDSocialWidgets

WordPress plugin WDSocialWidgets scored 10% from 54 tests.

About plugin

  • Plugin page: spider-facebook
  • Plugin version: 1.0.15
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.0
  • WordPress version: 5.8.1
  • First release: Apr 29, 2013
  • Latest release: Dec 16, 2019
  • Number of updates: 125
  • Update frequency: every 19.4 days
  • Top authors: webdorado (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

2,000+ active / 212,108 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/spider-facebook/spider_facebook_widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; spider_facebook has a deprecated constructor

Server metrics [RAM: ▼1.66MB] [CPU: ▼198.67ms] Passed 4 tests

Analyzing server-side resources used by WDSocialWidgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.97 ▼0.755.19 ▼20.18
Dashboard /wp-admin1.99 ▼1.075.33 ▼50.68
Posts /wp-admin/edit.php1.99 ▼1.126.36 ▼44.82
Add New Post /wp-admin/post-new.php1.99 ▼3.457.12 ▼664.87
Media Library /wp-admin/upload.php1.99 ▼1.016.31 ▼34.29
Licensing /wp-admin/admin.php?page=Licensing_Spider_Facebook1.995.90
Manage Facebook /wp-admin/admin.php?page=Spider_Facebook_manage1.995.71
Uninstall WD Social Widgets /wp-admin/admin.php?page=Uninstall_Spider_Facebook1.995.48

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 85 new files
Database: 2 new tables, 1 new option
New tables
wp_spiderfacebook_params
wp_spiderfacebook_login
New WordPress options
widget_spider_facebook

Browser metrics Passed 4 tests

This is an overview of browser requirements for WDSocialWidgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,721 ▲15015.88 ▲0.5310.31 ▼0.3548.96 ▼2.74
Dashboard /wp-admin2,998 ▲675.93 ▼0.08151.92 ▼21.07143.10 ▲19.43
Posts /wp-admin/edit.php2,795 ▲562.73 ▲0.0174.05 ▲3.7795.66 ▼0.50
Add New Post /wp-admin/post-new.php2,063 ▲48223.96 ▲4.63429.44 ▲20.77126.35 ▲6.91
Media Library /wp-admin/upload.php1,788 ▼195.00 ▼0.06147.66 ▼25.51144.27 ▲18.20
Licensing /wp-admin/admin.php?page=Licensing_Spider_Facebook1,1022.0566.3960.98
Manage Facebook /wp-admin/admin.php?page=Spider_Facebook_manage1,3513.2575.77110.35
Uninstall WD Social Widgets /wp-admin/admin.php?page=Uninstall_Spider_Facebook1,1572.0956.8871.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/spider-facebook/spider_facebook_widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; spider_facebook has a deprecated constructor
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_spiderfacebook_params
    • wp_spiderfacebook_login
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_spider_facebook

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Uninstall_Spider_Facebook
    • > Deprecated in wp-content/plugins/spider-facebook/spider_facebook_widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; spider_facebook has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Uninstall_Spider_Facebook
    • > Deprecated in wp-content/plugins/spider-facebook/spider_facebook_widget.php+58
    Function create_function() is deprecated
    • > GET request to /wp-admin/admin.php?page=Uninstall_Spider_Facebook
    • > Notice in wp-content/plugins/spider-facebook/spider-facebook.php+857
    Undefined index: mode

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/spider-facebook/facebook_manager.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/spider-facebook/includes/front_end_meta.php:496
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spider-facebook/includes/facebook_meta.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/spider-facebook/spider_facebook_widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/spider-facebook/spider_facebook_widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/spider-facebook/facbook_manager.html.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
No plugin tags provided

spider-facebook/spider-facebook.php Passed 13 tests

The main PHP script in "WDSocialWidgets" version 1.0.15 is automatically included on every request by WordPress
108 characters long description:
This plugin is a WordPress tool tha includes Facebooksocial plugins and widgets to be added to your website.

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
Good job! No executable or dangerous file extensions detected7,385 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP99581076,595
JavaScript2435780
HTML23010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.50
▷ Minimum class complexity5.00
▷ Maximum class complexity10.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
67 PNG files occupy 0.41MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/social_prev_2.png11.29KB4.28KB▼ 62.13%
images/close.png3.31KB0.92KB▼ 72.02%
images/share_hover.png4.16KB0.95KB▼ 77.20%
images/like_box.png4.21KB1.10KB▼ 73.99%
images/social_prev_3.png7.47KB2.89KB▼ 61.30%