10% nino-social-connect

Code Review | Nino Social Connect

WordPress plugin Nino Social Connect scored10%from 54 tests.

About plugin

  • Plugin page: nino-social-connect
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Mar 20, 2014
  • Latest release: Jul 10, 2014
  • Number of updates: 18
  • Update frequency: every 6.3 days
  • Top authors: ninotheme (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /7,158 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
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/nino-social-connect/includes/ninosocial_widget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; ninosocial_widget has a deprecated constructor

Server metrics [RAM: ▼1.79MB] [CPU: ▼60.59ms] Passed 4 tests

An overview of server-side resources used by Nino Social Connect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.274.98 ▼40.58
Dashboard /wp-admin2.21 ▼1.095.81 ▼49.39
Posts /wp-admin/edit.php2.21 ▼1.147.84 ▼45.60
Add New Post /wp-admin/post-new.php2.21 ▼3.676.83 ▼106.77
Media Library /wp-admin/upload.php2.21 ▼1.015.59 ▼31.69
Nino Social /wp-admin/options-general.php?page=nino_social2.226.21

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 172 new files
Database: no new tables, 49 new options
New WordPress options
can_compress_scripts
widget_recent-posts
nino_social_digg
nino_social_installajc
nino_social_carbonmade
nino_social_flickr
nino_social_forstorm
widget_recent-comments
nino_social_youtube_channel
nino_social_instagram
...

Browser metrics Passed 4 tests

A check of browser resources used by Nino Social Connect
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.34 ▲0.161.77 ▼0.4743.33 ▼5.05
Dashboard /wp-admin2,193 ▲135.54 ▼0.1286.46 ▼0.4439.07 ▼4.48
Posts /wp-admin/edit.php2,086 ▼142.00 ▼0.0235.58 ▼3.1734.21 ▲0.07
Add New Post /wp-admin/post-new.php1,528 ▼023.49 ▲0.33657.39 ▲12.1057.68 ▲4.83
Media Library /wp-admin/upload.php1,407 ▲164.18 ▼0.02101.76 ▼3.0941.82 ▼4.36
Nino Social /wp-admin/options-general.php?page=nino_social2,3382.3350.1290.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/nino-social-connect/includes/ninosocial_widget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; ninosocial_widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 49 options in the database
    • nino_social_social-google
    • widget_ninosocial_widget
    • nino_social_soundcloud
    • nino_social_instagram
    • nino_social_behance
    • nino_social_reddit
    • nino_social_forstorm
    • nino_social_dribbble
    • nino_social_evernote
    • nino_social_github
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=nino_social
    • > Deprecated in wp-content/plugins/nino-social-connect/includes/ninosocial_widget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; ninosocial_widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=nino_social
    • > Deprecated in wp-content/plugins/nino-social-connect/includes/ninosocial_widget.php+64
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=nino_social
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ninosocial_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=nino_social
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=nino_social
    • > Notice in wp-content/plugins/nino-social-connect/includes/social-form.php+15
    Undefined variable: nino_social_appear
    • > GET request to /wp-admin/options-general.php?page=nino_social
    • > Notice in wp-content/plugins/nino-social-connect/includes/social-form.php+29
    Undefined index: NINO_SOCIAL_FORM_SUBMIT

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nino-social-connect/includes/admin-page.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nino-social-connect/includes/ninosocial_widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ninosocial_provider_list() in wp-content/plugins/nino-social-connect/includes/social-form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nino-social-connect/includes/ninosocial_shortcode.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nino-social-connect/includes/admin-page.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: twitter, facebook, social profile connect, social widget, social profile...

nino-social-connect/nino-social.php 92% from 13 tests

The main file in "Nino Social Connect" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("nino-social-connect.php" instead of "nino-social.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,303 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS24671,172
PHP69519980
JavaScript1387151

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
161 PNG files occupy 9.86MB with 6.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/images/social-style/style-16.png4.87KB2.30KB▼ 52.73%
includes/assets/images/nino-social-sprite-style-13-46.png51.92KB19.53KB▼ 62.39%
includes/assets/images/nino-social-sprite-style-27-64.png162.58KB43.24KB▼ 73.40%
includes/assets/images/nino-social-sprite-style-1-46.png79.36KB17.29KB▼ 78.21%
includes/assets/images/social-style/style-12.png3.80KB2.04KB▼ 46.26%