78% social-networks-facebooktwittergoogle

Code Review | Social Networks

WordPress plugin Social Networks scored78%from 54 tests.

About plugin

  • Plugin page: social-networks-f...
  • Plugin version: 1.3.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.7
  • WordPress version: 6.3.1
  • First release: Oct 20, 2013
  • Latest release: May 20, 2014
  • Number of updates: 14
  • Update frequency: every 15.3 days
  • Top authors: Invoice (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active /7,169 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼8.74ms] Passed 4 tests

Analyzing server-side resources used by Social Networks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1145.03 ▲5.15
Dashboard /wp-admin3.37 ▲0.0748.18 ▼8.25
Posts /wp-admin/edit.php3.49 ▲0.1349.54 ▼9.28
Add New Post /wp-admin/post-new.php5.96 ▲0.0787.48 ▼20.78
Media Library /wp-admin/upload.php3.30 ▲0.0737.39 ▲3.37

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 248 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Social Networks: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,235 ▲48926.74 ▲12.17267.57 ▲265.62117.92 ▲69.99
Dashboard /wp-admin2,210 ▲255.84 ▼0.02115.85 ▼14.7446.43 ▼2.03
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0241.73 ▼5.8537.11 ▲0.52
Add New Post /wp-admin/post-new.php1,517 ▼217.42 ▼5.49689.92 ▼50.1554.00 ▼11.23
Media Library /wp-admin/upload.php1,392 ▲44.08 ▼0.13123.08 ▼3.4048.40 ▼2.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 248 files (1.22MB) in the plugin directory
    • (new file) colorpicker/colorpicker_hsb_b.png
    • (new file) colorpicker/colorpicker_hex.png
    • (new file) colorpicker/colorpicker_indic.gif
    • (new file) colorpicker/colorpicker_rgb_b.png
    • (new file) colorpicker/colorpicker_background.png
    • (new file) colorpicker/colorpicker_overlay.png
    • (new file) colorpicker/colorpicker_hsb_h.png
    • (new file) colorpicker/Thumbs.db
    • (new file) colorpicker/colorpicker_hsb_s.png
    • (new file) colorpicker/blank.gif
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_li_slider.php
    • > /wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_tw_slider.php
    • > /wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_yt_slider.php
    • > /wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_slider.php
    • > /wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_gp_slider.php
  • 372× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_tw_slider.php on line 42
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_gp_slider.php on line 23
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_slider.php on line 26
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_slider.php on line 39
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_li_slider.php on line 43
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_tw_slider.php on line 41
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_yt_slider.php on line 35
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_li_slider.php on line 47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/social-networks-facebooktwittergoogle/core/index.php:15
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/social-networks-facebooktwittergoogle/front/fblb_slider.php on line 37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: facebook, twitter, youtube, social networks, google plus...

social-networks-facebooktwittergoogle/social-networks.php 92% from 13 tests

The main file in "Social Networks" v. 1.3.13 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("social-networks-facebooktwittergoogle.php" instead of "social-networks.php")

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
There were no executable files found in this plugin5,656 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS7691783,130
PHP10111461,706
JavaScript438820

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code1.29
Average class complexity7.33
▷ Minimum class complexity4.00
▷ Maximum class complexity10.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
217 PNG files occupy 0.88MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/li11-right.png2.25KB1.60KB▼ 28.62%
img/tw7-left.png2.07KB1.78KB▼ 14.27%
colorpicker/colorpicker_hsb_s.png1.14KB0.80KB▼ 29.97%
img/li6-left.png1.09KB1.09KB0.00%
img/gp12-right-close.png2.42KB1.96KB▼ 19.15%