10% my-social-widgets-with-shortcode

Code Review | My Social Widgets With ShortCode

WordPress plugin My Social Widgets With ShortCode scored 10% from 54 tests.

About plugin

  • Plugin page: my-social-widgets...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: Apr 1, 2013
  • Latest release: Apr 5, 2013
  • Number of updates: 10
  • Update frequency: every 0.4 days
  • Top authors: krishna711 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,012 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Parse error in wp-content/plugins/my-social-widgets-with-shortcode/my-social-widgets.php+274
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.43ms] Passed 4 tests

An overview of server-side resources used by My Social Widgets With ShortCode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.90 ▼4.21
Dashboard /wp-admin3.31 ▲0.0049.97 ▲1.43
Posts /wp-admin/edit.php3.36 ▲0.0046.22 ▲3.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.47 ▼2.17
Media Library /wp-admin/upload.php3.23 ▲0.0035.72 ▲3.24

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for My Social Widgets With ShortCode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.27 ▼1.124.36 ▲2.3046.51 ▼8.13
Dashboard /wp-admin2,206 ▲184.99 ▼0.8599.01 ▼3.8439.00 ▼3.66
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0038.94 ▼1.8028.78 ▼13.31
Add New Post /wp-admin/post-new.php1,533 ▼022.90 ▼0.44611.73 ▼30.7863.90 ▲10.15
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.0094.28 ▼4.1741.55 ▼3.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/my-social-widgets-with-shortcode/widgets/twitter.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/my-social-widgets-with-shortcode/widgets/facebook.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/my-social-widgets-with-shortcode/widgets/recent_posts.php:7
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/my-social-widgets-with-shortcode/my-social-widgets.php on line 274

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tested up to: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

my-social-widgets-with-shortcode/my-social-widgets.php 92% from 13 tests

The entry point to "My Social Widgets With ShortCode" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("my-social-widgets-with-shortcode.php" instead of "my-social-widgets.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 plugin2,568 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42673921,695
PHP410348577
CSS16511296

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity35.00
▷ Minimum class complexity27.00
▷ Maximum class complexity42.00
Average method complexity8.85
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/twitter.png1.06KB0.33KB▼ 68.87%