10% wp-social-blocks

Code Review | Social Blocks

WordPress plugin Social Blocks scored10%from 54 tests.

About plugin

  • Plugin page: wp-social-blocks
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9.1
  • WordPress version: 6.3.1
  • First release: Sep 11, 2013
  • Latest release: Jun 19, 2014
  • Number of updates: 19
  • Update frequency: every 15.0 days
  • Top authors: sum4444 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,174 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/wp-social-blocks/widgets.php+11
    Declaration of Fblb_Widget::widget() should be compatible with WP_Widget::widget($args, $instance)

Server metrics [RAM: ▼1.86MB] [CPU: ▼50.13ms] Passed 4 tests

This is a short check of server-side resources used by Social Blocks
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.71 ▼32.03
Dashboard /wp-admin2.16 ▼1.156.74 ▼46.15
Posts /wp-admin/edit.php2.16 ▼1.206.62 ▼38.86
Add New Post /wp-admin/post-new.php2.16 ▼3.737.16 ▼83.46
Media Library /wp-admin/upload.php2.16 ▼1.075.91 ▼27.17
Twitter /wp-admin/admin.php?page=tw2.165.60
Facebook /wp-admin/admin.php?page=fblb2.166.70

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 25 new options
New WordPress options
fblb_height
widget_recent-comments
tw_nofooter
fblb_header
fb_page_link
can_compress_scripts
fblb_border
fblb_color
widget_recent-posts
widget_twitter_timeline_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Social Blocks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.24 ▼1.131.80 ▼0.0440.79 ▼8.84
Dashboard /wp-admin2,233 ▲425.84 ▲0.98102.45 ▲1.4838.84 ▼6.60
Posts /wp-admin/edit.php2,116 ▲302.03 ▲0.0240.14 ▲2.4336.30 ▲2.50
Add New Post /wp-admin/post-new.php1,536 ▲1617.82 ▼5.41676.30 ▲20.8157.39 ▼5.75
Media Library /wp-admin/upload.php1,409 ▲184.21 ▼0.0498.25 ▼7.1241.16 ▼5.07
Twitter /wp-admin/admin.php?page=tw9982.2028.4425.35
Facebook /wp-admin/admin.php?page=fblb9642.0724.6024.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/wp-social-blocks/widgets.php+11
    Declaration of Fblb_Widget::widget() should be compatible with WP_Widget::widget($args, $instance)
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_fblb_widget
    • widget_twitter_timeline_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=fblb
    • > Warning in wp-content/plugins/wp-social-blocks/widgets.php+11
    Declaration of Fblb_Widget::widget() should be compatible with WP_Widget::widget($args, $instance)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=fblb
    • > Warning in wp-content/plugins/wp-social-blocks/widgets.php+27
    Declaration of Twitter_Timeline_Widget::widget() should be compatible with WP_Widget::widget($args, $instance)

SRP 50% 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 fix the following items
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-social-blocks/admin/tinymce/tinymce.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-social-blocks/admin/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-social-blocks/widgets.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-social-blocks/twitter_timeline.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-social-blocks/wp-social-blocks.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-social-blocks/fblb.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-social-blocks/admin/update_options.php:31

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

wp-social-blocks/wp-social-blocks.php Passed 13 tests

The main PHP file in "Social Blocks" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
41 characters long description:
Add Social Blocks to your wordpress sites

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected400 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP94413352
JavaScript127148

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
admin/assets/img/tinymce_icon.png0.23KB0.14KB▼ 36.36%