84% social-network-widget

Code Review | Social Network Widget

WordPress plugin Social Network Widget scored84%from 54 tests.

About plugin

  • Plugin page: social-network-wi...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WordPress 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Dec 24, 2019
  • Latest release: Nov 8, 2020
  • Number of updates: 10
  • Update frequency: every 32.2 days
  • Top authors: mahdiyazdani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /962 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Social Network Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.89 ▲0.80
Dashboard /wp-admin3.32 ▲0.0254.75 ▲3.82
Posts /wp-admin/edit.php3.44 ▲0.0848.92 ▼1.91
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.43 ▼11.63
Media Library /wp-admin/upload.php3.25 ▲0.0246.11 ▲9.26

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_social_network_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Social Network Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.82 ▲0.1943.86 ▲2.40
Dashboard /wp-admin2,195 ▲185.55 ▼0.0692.14 ▲3.7040.83 ▼4.17
Posts /wp-admin/edit.php2,097 ▼31.94 ▼0.0935.01 ▼5.7036.98 ▼1.21
Add New Post /wp-admin/post-new.php1,526 ▼020.98 ▼2.54674.73 ▼20.2355.92 ▼8.68
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.0595.70 ▼18.3348.14 ▲0.54

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_social_network_widget
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Everything seems fine, however 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 trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/social-network-widget/social-network-widget.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
6 plugin tags: icons, social networks, social icons, social media, social profiles...

social-network-widget/social-network-widget.php 85% from 13 tests

"Social Network Widget" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.2" instead of "7.2.0")
  • Requires at least: Required version number should use periods and dots only (ex. "7.0" instead of "WordPress 5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin826 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP454219564
JavaScript2716116
CSS401489
Markdown119057

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.33
Average class complexity18.00
▷ Minimum class complexity9.00
▷ Maximum class complexity27.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods18
▷ Static methods527.78%
▷ Public methods1688.89%
▷ Protected methods211.11%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected