84% widget-for-social-page

Code Review | Widget for Social Page

WordPress plugin Widget for Social Page scored84%from 54 tests.

About plugin

  • Plugin page: widget-for-social...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 19, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 14
  • Update frequency: every 44.9 days
  • Top authors: mdhadid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /409 total downloads


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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.61ms] Passed 4 tests

Server-side resources used by Widget for Social Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.76 ▼5.94
Dashboard /wp-admin3.33 ▲0.0350.47 ▲3.85
Posts /wp-admin/edit.php3.38 ▲0.0345.82 ▼6.82
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.67 ▼12.77
Media Library /wp-admin/upload.php3.25 ▲0.0338.39 ▲3.10

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Widget for Social Page: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.65 ▼0.755.43 ▲3.3742.83 ▼7.78
Dashboard /wp-admin2,206 ▲185.86 ▲0.9698.15 ▼16.3040.59 ▼5.36
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0333.39 ▼3.6039.35 ▲5.08
Add New Post /wp-admin/post-new.php1,533 ▲1423.29 ▲0.03679.81 ▲33.5753.23 ▲5.05
Media Library /wp-admin/upload.php1,391 ▼04.12 ▼0.1096.11 ▼7.3544.76 ▼1.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_widget_for_social_page_embed
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× 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/widget-for-social-page/includes/widget-for-social-page-embed.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-for-social-page/widget-for-social-page.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: widget, facebook page, facebook, facebook link, facebook feed...

widget-for-social-page/widget-for-social-page.php Passed 13 tests

This is the main PHP file of "Widget for Social Page" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
138 characters long description:
It will embed your facebook page into a widget area. You can add a widget in any of your widget areas and It will show your facebook page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin112 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File18833

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected