84% socialmediafeedwidget

Code Review | SocialMediaFeedWidget

WordPress plugin SocialMediaFeedWidget scored84%from 54 tests.

About plugin

  • Plugin page: socialmediafeedwi...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.2-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 12, 2020
  • Latest release: Aug 12, 2020
  • Number of updates: 13
  • Update frequency: N/A
  • Top authors: phpcodingmaster (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /469 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼4.81ms] Passed 4 tests

Analyzing server-side resources used by SocialMediaFeedWidget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1436.12 ▼1.79
Dashboard /wp-admin3.43 ▲0.1345.55 ▼4.36
Posts /wp-admin/edit.php3.55 ▲0.1951.87 ▼1.07
Add New Post /wp-admin/post-new.php6.03 ▲0.1580.52 ▼12.03
Media Library /wp-admin/upload.php3.35 ▲0.1335.33 ▲0.96

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 123 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_social_media_feed_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by SocialMediaFeedWidget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.21 ▼0.921.52 ▼0.3038.38 ▼8.05
Dashboard /wp-admin2,233 ▲454.88 ▲0.02108.58 ▲0.2740.14 ▼1.81
Posts /wp-admin/edit.php2,118 ▲292.21 ▲0.2142.03 ▼4.7933.55 ▼1.07
Add New Post /wp-admin/post-new.php1,550 ▲1723.26 ▲0.01661.92 ▼41.6055.86 ▲3.00
Media Library /wp-admin/upload.php1,418 ▲334.26 ▼0.0696.69 ▼7.1043.42 ▼2.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_social_media_feed_widget
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 98× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/socialmediafeedwidget/AdminNotices/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/socialmediafeedwidget/AdminNotices/vendor/composer/installers/src/Composer/Installers/AglInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/socialmediafeedwidget/AdminNotices/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/socialmediafeedwidget/AdminNotices/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/socialmediafeedwidget/AdminNotices/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/socialmediafeedwidget/AdminNotices/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/socialmediafeedwidget/AdminNotices/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/socialmediafeedwidget/AdminNotices/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/socialmediafeedwidget/AdminNotices/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/socialmediafeedwidget/AdminNotices/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: facebok like box, facebook posts, facebook, facebook widget, facebook page...

socialmediafeedwidget/SocialMediaFeedWidget.php 85% from 13 tests

The entry point to "SocialMediaFeedWidget" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("socialmediafeedwidget.php" instead of "SocialMediaFeedWidget.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "5.4.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin2,830 lines of code in 112 files:
LanguageFilesBlank linesComment linesLines of code
PHP1064938192,452
JSON400330
Markdown114034
JavaScript11014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity2.79
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes101
▷ Abstract classes10.99%
▷ Concrete classes10099.01%
▷ Final classes11.00%
Methods134
▷ Static methods42.99%
▷ Public methods8966.42%
▷ Protected methods3123.13%
▷ Private methods1410.45%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
6 PNG files occupy 0.24MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png28.50KB11.74KB▼ 58.81%
assets/screenshot-2.PNG16.48KB8.70KB▼ 47.20%
assets/screenshot-1.PNG160.76KB54.61KB▼ 66.03%
assets/banner-772x250-rtl.png28.50KB11.74KB▼ 58.81%
assets/icon-128x128.png2.93KB1.54KB▼ 47.63%