68% social-images-widget

Code Review | Social Images Widget

WordPress plugin Social Images Widget scored68%from 54 tests.

About plugin

  • Plugin page: social-images-widget
  • Plugin version: 2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2019
  • Latest release: Jul 24, 2020
  • Number of updates: 10
  • Update frequency: every 29.5 days
  • Top authors: lyrathemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /4,314 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.70MB] [CPU: ▼44.62ms] Passed 4 tests

This is a short check of server-side resources used by Social Images Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.1710.43 ▼29.63
Dashboard /wp-admin2.30 ▼1.0011.73 ▼36.47
Posts /wp-admin/edit.php2.30 ▼1.0513.41 ▼32.13
Add New Post /wp-admin/post-new.php2.30 ▼3.5814.56 ▼80.26
Media Library /wp-admin/upload.php2.30 ▼0.9311.23 ▼24.37
Instagram Widget /wp-admin/options-general.php?page=social-images-widget2.3012.08

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_siw-widget
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Images Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.11 ▼1.244.61 ▲2.9841.14 ▼3.53
Dashboard /wp-admin2,209 ▲184.86 ▼1.04109.78 ▲9.1946.68 ▲2.48
Posts /wp-admin/edit.php2,098 ▲92.03 ▼0.0339.35 ▲3.3035.16 ▼0.36
Add New Post /wp-admin/post-new.php1,542 ▲2318.37 ▼4.88592.81 ▼96.0153.82 ▼13.38
Media Library /wp-admin/upload.php1,397 ▲94.19 ▲0.01101.29 ▲2.1144.52 ▲0.17
Instagram Widget /wp-admin/options-general.php?page=social-images-widget7932.0524.8134.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/social-images-widget/class-social-images-widget-feed.php+11
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_siw-widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=social-images-widget
    • > Notice in wp-content/plugins/social-images-widget/class-social-images-widget-feed.php+13
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-images-widget/partials/admin/social-images-widget-admin-display.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-images-widget/class-social-images-widget.php:2
    • > PHP Warning
      Use of undefined constant SOCIAL_IMAGES_WIDGET_INSTAGRAM_CLIENT_ID - assumed 'SOCIAL_IMAGES_WIDGET_INSTAGRAM_CLIENT_ID' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-images-widget/class-social-images-widget-settings.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/social-images-widget/class-social-images-widget-settings.php:17
    • > PHP Warning
      Use of undefined constant SOCIAL_IMAGES_WIDGET_NAME - assumed 'SOCIAL_IMAGES_WIDGET_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-images-widget/class-social-images-widget-settings.php on line 88
    • > PHP Warning
      Use of undefined constant SOCIAL_IMAGES_WIDGET_INSTAGRAM_REDIRECT_URL - assumed 'SOCIAL_IMAGES_WIDGET_INSTAGRAM_REDIRECT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-images-widget/class-social-images-widget-settings.php on line 15
    • > PHP Warning
      Use of undefined constant SOCIAL_IMAGES_WIDGET_VERSION - assumed 'SOCIAL_IMAGES_WIDGET_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-images-widget/class-social-images-widget-settings.php on line 88

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

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
9 plugin tags: simple, instagram, social media, widget, sidebar...

social-images-widget/social-images-widget.php Passed 13 tests

The entry point to "Social Images Widget" version 2.1 is a PHP file that has certain tags in its header comment area
28 characters long description:
Display your Instagram feed.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin390 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP613747355
CSS18035

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity13.67
▷ Minimum class complexity7.00
▷ Maximum class complexity21.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
There are no PNG files in this plugin