84% vit-social

Code Review | VIT Social

WordPress plugin VIT Social scored84%from 54 tests.

About plugin

  • Plugin page: vit-social
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-5.2.4
  • WordPress version: 6.3.1
  • First release: Aug 16, 2016
  • Latest release: Oct 20, 2019
  • Number of updates: 3
  • Update frequency: every 386.7 days
  • Top authors: vitthalaa (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /616 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.05ms] Passed 4 tests

Server-side resources used by VIT Social
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.36 ▲1.31
Dashboard /wp-admin3.33 ▲0.0354.40 ▼6.46
Posts /wp-admin/edit.php3.39 ▲0.0348.13 ▼1.54
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.23 ▼1.52
Media Library /wp-admin/upload.php3.26 ▲0.0337.72 ▲1.76
VIT Social /wp-admin/options-general.php?page=vit-social3.2634.24

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for VIT Social
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▲0.091.68 ▼0.1848.02 ▲2.72
Dashboard /wp-admin2,193 ▲165.61 ▼0.02100.61 ▲0.2243.50 ▲0.12
Posts /wp-admin/edit.php2,101 ▲42.03 ▲0.0734.27 ▼2.6735.52 ▲1.80
Add New Post /wp-admin/post-new.php6,274 ▲4,74621.00 ▼2.23904.41 ▲253.6176.26 ▲10.14
Media Library /wp-admin/upload.php1,407 ▲74.17 ▼0.0098.46 ▼4.1843.68 ▼0.72
VIT Social /wp-admin/options-general.php?page=vit-social9811.6825.4730.20

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/vit-social/resources/assets/css/vit-social.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 31 tag instead of maximum 10
The official readme.txt is a good inspiration

vit-social/vit-social.php Passed 13 tests

The main file in "VIT Social" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
124 characters long description:
VIT Social share plugin provides you customization, post wise share buttons with sort order for post or page sharing option.

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
Good job! No executable or dangerous file extensions detected1,485 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP11152416761
SVG100640
JavaScript3151866
CSS21718

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.00
▷ Minimum class complexity2.00
▷ Maximum class complexity19.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods53
▷ Static methods00.00%
▷ Public methods4686.79%
▷ Protected methods00.00%
▷ Private methods713.21%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/assets/images/whatsapp-icon.png11.61KB5.71KB▼ 50.80%
resources/assets/images/linkedin-icon.png7.95KB4.57KB▼ 42.49%
resources/assets/images/twitter-icon.png41.24KB12.35KB▼ 70.06%
resources/assets/images/google-icon.png42.89KB7.89KB▼ 81.60%
resources/assets/images/insta-icon.png15.85KB5.41KB▼ 65.84%