78% social-media-everywhere

Code Review | Social Media Everywhere

WordPress plugin Social Media Everywhere scored 78% from 54 tests.

About plugin

  • Plugin page: social-media-ever...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 22, 2018
  • Latest release: Sep 22, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: arnoldgalovics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 528 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.14ms] Passed 4 tests

A check of server-side resources used by Social Media Everywhere
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1739.03 ▼7.05
Dashboard /wp-admin3.49 ▲0.1843.86 ▼3.63
Posts /wp-admin/edit.php3.54 ▲0.1847.63 ▲0.82
Add New Post /wp-admin/post-new.php6.02 ▲0.1485.11 ▼6.70
Media Library /wp-admin/upload.php3.35 ▲0.1239.07 ▲8.85
Social Media Everywhere /wp-admin/options-general.php?page=socialmediaeverywhere3.2930.44

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 17 new options
New WordPress options
socialmediaeverywhere_google_plus_account
socialmediaeverywhere_popup_expiration
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
socialmediaeverywhere_enabled
socialmediaeverywhere_instagram_account
can_compress_scripts
socialmediaeverywhere_popup_show_setting
socialmediaeverywhere_popup_title
...

Browser metrics Passed 4 tests

A check of browser resources used by Social Media Everywhere
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲15613.65 ▼0.768.37 ▲6.4539.61 ▼3.81
Dashboard /wp-admin2,218 ▲304.89 ▲0.00105.20 ▼13.8137.62 ▼7.50
Posts /wp-admin/edit.php2,101 ▲122.03 ▼0.0139.84 ▲3.2335.56 ▲0.99
Add New Post /wp-admin/post-new.php1,525 ▼817.73 ▼5.11663.93 ▲46.0752.76 ▼2.52
Media Library /wp-admin/upload.php1,403 ▲124.30 ▲0.1193.18 ▼4.2339.93 ▼1.96
Social Media Everywhere /wp-admin/options-general.php?page=socialmediaeverywhere1,0132.0825.7027.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 17 options in the database
    • widget_theysaidso_widget
    • socialmediaeverywhere_popup_expiration
    • theysaidso_admin_options
    • socialmediaeverywhere_google_plus_account
    • db_upgraded
    • socialmediaeverywhere_instagram_account
    • socialmediaeverywhere_popup_timed_sec
    • socialmediaeverywhere_youtube_account
    • widget_recent-comments
    • socialmediaeverywhere_twitter_account
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=socialmediaeverywhere
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=socialmediaeverywhere
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Almost there! Just fix the following items
  • 108× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Settings' not found in wp-content/plugins/social-media-everywhere/admin/general_settings.php:11
    • > PHP Warning
      Use of undefined constant SME_PATH - assumed 'SME_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-media-everywhere/public/popup/popup_core.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/social-media-everywhere/social-media-everywhere.php:13
    • > PHP Warning
      include_once(SME_PATHadmin/account/account.php): failed to open stream: No such file or directory in wp-content/plugins/social-media-everywhere/admin/account/instagram_account.php on line 3
    • > PHP Warning
      include_once(): Failed opening 'SME_PATHadmin/account/instagram_account.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/social-media-everywhere/admin/general_settings.php on line 6
    • > PHP Warning
      include_once(SME_PATHpublic/popup/popup.php): failed to open stream: No such file or directory in wp-content/plugins/social-media-everywhere/public/popup/linkedin_popup.php on line 3
    • > PHP Warning
      include_once(): Failed opening 'SME_PATHadmin/account/twitter_account.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/social-media-everywhere/admin/general_settings.php on line 5
    • > PHP Warning
      Use of undefined constant SME_PATH - assumed 'SME_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-media-everywhere/admin/general_settings.php on line 3
    • > PHP Warning
      include_once(SME_PATHpublic/popup/popup.php): failed to open stream: No such file or directory in wp-content/plugins/social-media-everywhere/public/popup/twitter_popup.php on line 3
    • > PHP Warning
      include_once(): Failed opening 'SME_PATHadmin/account/account.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/social-media-everywhere/admin/account/instagram_account.php on line 3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: twitter, social, facebook, youtube, linkedin...

social-media-everywhere/social-media-everywhere.php 92% from 13 tests

Analyzing the main PHP file in "Social Media Everywhere" version 1.0.1
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 177 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin784 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP2212110626
CSS200156
JavaScript2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.14
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes21
▷ Abstract classes29.52%
▷ Concrete classes1990.48%
▷ Final classes19100.00%
Methods76
▷ Static methods00.00%
▷ Public methods3850.00%
▷ Protected methods3546.05%
▷ Private methods33.95%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/twitter_icon_circle.png8.65KB4.06KB▼ 53.07%
public/images/linkedin_icon.png2.23KB0.66KB▼ 70.22%