10% metro-style-social-widget

Code Review | Metro Style Social Widget

WordPress plugin Metro Style Social Widget scored 10% from 54 tests.

About plugin

  • Plugin page: metro-style-socia...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.5.3
  • WordPress version: 5.8.1
  • First release: Jul 4, 2013
  • Latest release: Aug 2, 2016
  • Number of updates: 49
  • Update frequency: every 23.0 days
  • Top authors: Manivannan M (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

1,000+ active / 54,082 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/metro-style-social-widget/metro_style_social_widget.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; Metro_Style_Socialicons_Widget has a deprecated constructor

Server metrics [RAM: ▼1.74MB] [CPU: ▼188.98ms] Passed 4 tests

Server-side resources used by Metro Style Social Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼0.959.02 ▼28.40
Dashboard /wp-admin1.91 ▼1.155.64 ▼40.89
Posts /wp-admin/edit.php1.91 ▼1.204.81 ▼40.75
Add New Post /wp-admin/post-new.php1.91 ▼3.536.42 ▼645.87
Media Library /wp-admin/upload.php1.91 ▼1.095.74 ▼25.70

Server storage [IO: ▲0.25MB] [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: 14 new files
Database: no new tables, 1 new option
New WordPress options
widget_metro_style_social_widget

Browser metrics Passed 4 tests

Metro Style Social Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,695 ▲9915.82 ▲0.069.09 ▲0.0842.87 ▼7.30
Dashboard /wp-admin2,987 ▲535.95 ▲0.02131.09 ▼13.81113.56 ▼0.22
Posts /wp-admin/edit.php2,753 ▲142.71 ▼0.0068.69 ▲2.60105.25 ▲7.41
Add New Post /wp-admin/post-new.php1,686 ▲318.85 ▲0.14357.26 ▼18.77103.83 ▼4.15
Media Library /wp-admin/upload.php1,818 ▲705.03 ▲0.01149.43 ▲2.38116.81 ▼3.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/metro-style-social-widget/metro_style_social_widget.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; Metro_Style_Socialicons_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_metro_style_social_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/metro-style-social-widget/style_without_buttons.php
    • > /wp-content/plugins/metro-style-social-widget/style_with_buttons.php
  • 46× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: twitter in wp-content/plugins/metro-style-social-widget/style_with_buttons.php on line 20
    • > PHP Notice
      Undefined variable: noyoutube in wp-content/plugins/metro-style-social-widget/style_without_buttons.php on line 1
    • > PHP Notice
      Undefined variable: pinterest_color in wp-content/plugins/metro-style-social-widget/style_with_buttons.php on line 37
    • > PHP Notice
      Undefined variable: linkedin_color in wp-content/plugins/metro-style-social-widget/style_without_buttons.php on line 12
    • > PHP Notice
      Undefined variable: pinterest_color in wp-content/plugins/metro-style-social-widget/style_without_buttons.php on line 14
    • > PHP Notice
      Undefined variable: pinterest in wp-content/plugins/metro-style-social-widget/style_with_buttons.php on line 37
    • > PHP Notice
      Undefined variable: twitter in wp-content/plugins/metro-style-social-widget/style_without_buttons.php on line 10
    • > PHP Notice
      Undefined variable: specificfeed in wp-content/plugins/metro-style-social-widget/style_with_buttons.php on line 51
    • > PHP Notice
      Undefined variable: nolinkedin in wp-content/plugins/metro-style-social-widget/style_without_buttons.php on line 1
    • > PHP Notice
      Undefined variable: norssfeed in wp-content/plugins/metro-style-social-widget/style_with_buttons.php on line 1

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

metro-style-social-widget/metro_style_social_widget.php 92% from 13 tests

This is the main PHP file of "Metro Style Social Widget" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("metro-style-social-widget.php" instead of "metro_style_social_widget.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
Success! There were no dangerous files found in this plugin3,113 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31,053212,909
CSS1230204

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/feed.png1.07KB1.36KB0.00%
images/facebook.png0.68KB0.77KB0.00%
images/linkedin.png1.04KB1.07KB0.00%
images/youtube.png1.92KB1.92KB0.00%
images/twitter.png0.64KB0.73KB0.00%