84% social-media-block

Code Review | Social Media Block

WordPress plugin Social Media Block scored84%from 54 tests.

About plugin

  • Plugin page: social-media-block
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-5.0
  • WordPress version: 6.3.1
  • First release: Jun 3, 2018
  • Latest release: Dec 10, 2018
  • Number of updates: 7
  • Update frequency: every 27.7 days
  • Top authors: tomshare (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,306 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.18MB] [CPU: ▼8.22ms] Passed 4 tests

Analyzing server-side resources used by Social Media Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0740.48 ▲3.20
Dashboard /wp-admin3.31 ▲0.0141.75 ▼4.96
Posts /wp-admin/edit.php3.37 ▲0.0143.46 ▲1.24
Add New Post /wp-admin/post-new.php5.15 ▼0.7471.45 ▼24.01
Media Library /wp-admin/upload.php3.24 ▲0.0131.45 ▼5.14

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 242 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Social Media Block: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲20414.84 ▲0.5632.40 ▲30.6543.86 ▲3.47
Dashboard /wp-admin2,195 ▲175.54 ▼0.1082.70 ▼23.9637.98 ▼2.74
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0235.68 ▼0.7131.05 ▼3.06
Add New Post /wp-admin/post-new.php1,542 ▲1623.20 ▲0.31652.42 ▼15.5434.07 ▼18.00
Media Library /wp-admin/upload.php1,400 ▼04.14 ▼0.0795.48 ▼17.9641.82 ▼3.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/social-media-block/icons_theme/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (One option is to give your icons a round shape), #2 (Alternatively, the icons can be squared), #3 (You can also show rectangle icons, which spell out the action)
Please take inspiration from this readme.txt

social-media-block/social-media-block.php Passed 13 tests

The main PHP file in "Social Media Block" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
73 characters long description:
Drag & drop block in Gutenberg to place social media buttons on your site

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 detected521 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21351371
PHP23316168
SVG22060
CSS24022

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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

PNG files should be compressed to save space and minimize bandwidth usage
233 PNG files occupy 0.72MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons_theme/round/flipboard.png3.47KB1.76KB▼ 49.31%
icons_theme/round/stumbleupon.png4.48KB2.30KB▼ 48.55%
icons_theme/round/windows_store.png4.67KB2.34KB▼ 49.83%
icons_theme/round/playstore.png4.36KB2.25KB▼ 48.36%
icons_theme/round/github.png4.00KB2.22KB▼ 44.58%