10% social2blog

Code Review | Social2Blog

WordPress plugin Social2Blog scored10%from 54 tests.

About plugin

  • Plugin page: social2blog
  • Plugin version: 0.2.990
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.5
  • WordPress version: 6.3.1
  • First release: Jul 3, 2016
  • Latest release: May 11, 2021
  • Number of updates: 55
  • Update frequency: every 32.3 days
  • Top authors: xkollsoftware (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

200+ active /10,880 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5737
    Function get_bloginfo was called with an argument that is deprecated since version 2.2.0! The siteurl option is deprecated for the family of bloginfo() functions. Use the url option instead.

Server metrics [RAM: ▲0.46MB] [CPU: ▲491.13ms] 50% from 4 tests

Server-side resources used by Social2Blog
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 686.73ms on /wp-admin/admin.php?page=social2blog-instagram)
  • Extra CPU: Extra CPU usage must be kept under 200.00ms (currently 491.13ms on /wp-admin/admin.php?page=social2blog-instagram)
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.4945.19 ▲3.48
Dashboard /wp-admin3.78 ▲0.43728.63 ▲668.34
Posts /wp-admin/edit.php3.83 ▲0.47763.19 ▲715.24
Add New Post /wp-admin/post-new.php6.36 ▲0.47727.15 ▲631.42
Media Library /wp-admin/upload.php3.70 ▲0.47698.95 ▲661.27
Manage Gallery /wp-admin/admin.php?page=social2blog-gallery3.61681.49
Social2Blog /wp-admin/admin.php?page=social2blog3.67681.33
Manage Instagram /wp-admin/admin.php?page=social2blog-instagram3.61686.73

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 214 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
social2blog_advice_cat
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
social2blog_tw_tags
social2blog_outofsync

Browser metrics Passed 4 tests

A check of browser resources used by Social2Blog
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.42 ▼1.271.52 ▼0.4126.90 ▼16.19
Dashboard /wp-admin2,308 ▲1174.95 ▼0.93100.96 ▼1.5783.61 ▲41.49
Posts /wp-admin/edit.php2,206 ▲1142.17 ▲0.1735.52 ▼5.3252.77 ▲16.57
Add New Post /wp-admin/post-new.php1,689 ▲15522.46 ▼0.72671.74 ▲1.2645.17 ▼13.51
Media Library /wp-admin/upload.php1,502 ▲1114.17 ▼0.0493.61 ▼2.4090.25 ▲45.86
Manage Gallery /wp-admin/admin.php?page=social2blog-gallery9192.2025.6037.97
Social2Blog /wp-admin/admin.php?page=social2blog1,0782.2328.8641.88
Manage Instagram /wp-admin/admin.php?page=social2blog-instagram9232.2024.3131.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/social2blog/social2blog_plugin.php:40
    • > PHP Warning
      Use of undefined constant SOCIAL2BLOG_PLUGINGDIR - assumed 'SOCIAL2BLOG_PLUGINGDIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/social2blog/commons/helpers/class.social2blog-log.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=social2blog-instagram
    • > Network (severe)
    js/social2blog.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: import twitter, twitter posts, import facebook post, facebook events, facebook posts...

social2blog/social2blog_plugin.php 77% from 13 tests

The primary PHP file in "Social2Blog" version 0.2.990 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("social2blog.php" instead of "social2blog_plugin.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: The description should be shorter than 140 characters (currently 193 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin20,306 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
PO File865,9387,26115,568
PHP147857892,972
HTML1390462
JavaScript28461392
CSS385337
JSON400141
LESS13429132
Sass13429132
Markdown2410107
TypeScript17563

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity22.12
▷ Minimum class complexity1.00
▷ Maximum class complexity93.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods149
▷ Static methods2315.44%
▷ Public methods14597.32%
▷ Protected methods00.00%
▷ Private methods42.68%
Functions52
▷ Named functions52100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
setting.png1.50KB1.06KB▼ 29.58%
icon.png0.73KB0.72KB0.40%
icon-big.png1.37KB1.43KB0.00%
851579_209602122530903_1060396115_n.png0.93KB0.87KB▼ 6.93%