72% easy-embed-for-social-media

Code Review | Easy Embed for Social Media Wall

WordPress plugin Easy Embed for Social Media Wall scored72%from 54 tests.

About plugin

  • Plugin page: easy-embed-for-so...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2020
  • Latest release: Nov 8, 2022
  • Number of updates: 17
  • Update frequency: every 42.4 days
  • Top authors: vaibhavagar (94.12%)j.burleigh1 (11.76%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /736 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
Installer ran successfully

Server metrics [RAM: ▼11.67MB] [CPU: ▼2,440,549.97ms] Passed 4 tests

A check of server-side resources used by Easy Embed for Social Media Wall
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▼47.2142.46 ▼9,762,200.53
Dashboard /wp-admin50.83 ▲47.449,771,664.39 ▲9,771,594.63
Posts /wp-admin/edit.php3.61 ▲0.2149.94 ▼0.42
Add New Post /wp-admin/post-new.php6.10 ▲0.17101.20 ▼6.36
Media Library /wp-admin/upload.php3.42 ▲0.1540.90 ▲7.42
Easy Embed for Social Media Wall /wp-admin/options-general.php?page=eefsm-fb-api3.3735.00

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Embed for Social Media Wall
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲16213.51 ▼0.729.07 ▲7.4744.65 ▲5.11
Dashboard /wp-admin2,218 ▲445.81 ▲0.2190.46 ▼4.1741.40 ▲4.10
Posts /wp-admin/edit.php2,128 ▲282.29 ▲0.2941.16 ▲3.3638.35 ▲3.73
Add New Post /wp-admin/post-new.php1,550 ▲2423.18 ▼0.35661.15 ▼49.2837.62 ▼32.16
Media Library /wp-admin/upload.php1,433 ▲334.28 ▼0.1297.92 ▼19.2047.08 ▼2.84
Easy Embed for Social Media Wall /wp-admin/options-general.php?page=eefsm-fb-api1,2441.9128.1837.63

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=eefsm-fb-api
    • > Notice in wp-content/plugins/easy-embed-for-social-media/admin/partials/easy-embed-for-Social-Media-admin-display.php+198
    Trying to access array offset on value of type bool
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=eefsm-fb-api
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=eefsm-fb-api
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/easy-embed-for-social-media/admin/partials/easy-embed-for-Social-Media-admin-display.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_get() in wp-content/plugins/easy-embed-for-social-media/public/partials/easy-embed-for-Social-Media-public-display.php:21
    • > PHP Notice
      Undefined variable: fb_page_id in wp-content/plugins/easy-embed-for-social-media/public/partials/easy-embed-for-Social-Media-public-display.php on line 20
    • > PHP Notice
      Undefined variable: access_token in wp-content/plugins/easy-embed-for-social-media/public/partials/easy-embed-for-Social-Media-public-display.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: facebook, facebook live, wordpress plugin for facebook, video embed, wordpress plugin for facebook feed...

easy-embed-for-social-media/easy-embed-for-Social-Media.php 85% from 13 tests

"Easy Embed for Social Media Wall" version 1.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-embed-for-social-media.php" instead of "easy-embed-for-Social-Media.php")

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
There were no executable files found in this plugin787 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12181639611
CSS221087
JavaScript255483
SVG1006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.29
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 PNG files occupy 0.65MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/cross.png2.67KB2.12KB▼ 20.80%
admin/img/slide6.png20.96KB11.08KB▼ 47.12%
admin/img/twitch-player.png6.97KB4.26KB▼ 38.90%
admin/img/twitch-wall.png7.49KB4.16KB▼ 44.49%
admin/img/slide5.png28.56KB16.82KB▼ 41.10%