83% sim-social-feed

Code Review | Sim Social Feed

WordPress plugin Sim Social Feed scored83%from 54 tests.

About plugin

  • Plugin page: sim-social-feed
  • Plugin version: 2.8.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.7
  • WordPress version: 6.3.1
  • First release: Jul 20, 2020
  • Latest release: Mar 22, 2021
  • Number of updates: 16
  • Update frequency: every 15.3 days
  • Top authors: icelayer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /730 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.40ms] Passed 4 tests

A check of server-side resources used by Sim Social Feed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.80 ▼5.75
Dashboard /wp-admin3.33 ▲0.0248.86 ▼3.95
Posts /wp-admin/edit.php3.38 ▲0.0255.81 ▲4.42
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.28 ▼30.00
Media Library /wp-admin/upload.php3.25 ▲0.0237.54 ▼1.90
Instagram Feed /wp-admin/admin.php?page=simsf-social-feed-settings3.3840.85
Account Setup /wp-admin/admin.php?page=simsf-account-setup3.2935.04
Refresh Access Token /wp-admin/admin.php?page=simsf-refresh-access-token3.2633.33

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
simsf_user_media
widget_theysaidso_widget
simsf_token
simsf_access_token

Browser metrics Passed 4 tests

Sim Social Feed: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.35 ▲0.121.58 ▼0.1543.56 ▼0.71
Dashboard /wp-admin2,228 ▲515.54 ▼0.1182.82 ▼7.2641.17 ▼0.37
Posts /wp-admin/edit.php2,133 ▲332.02 ▲0.0639.13 ▲2.2837.23 ▲2.83
Add New Post /wp-admin/post-new.php1,572 ▲4418.30 ▼4.77616.43 ▼51.5862.87 ▲12.89
Media Library /wp-admin/upload.php1,433 ▲364.24 ▲0.0394.05 ▼25.6444.21 ▼2.42
Instagram Feed /wp-admin/admin.php?page=simsf-social-feed-settings9072.1624.8955.11
Account Setup /wp-admin/admin.php?page=simsf-account-setup9362.1932.1749.15
Refresh Access Token /wp-admin/admin.php?page=simsf-refresh-access-token9262.1924.6939.41

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sim-social-feed/src/Admin/pages/social-feed-settings/refresh-access-token.admin.php:33
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sim-social-feed/src/WPAdminPage/pages/footer.admin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SimSocialFeed\\WPAdminPage\\AdminPage' not found in wp-content/plugins/sim-social-feed/src/Admin/SocialFeedAdmin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sim-social-feed/src/inc/shortcode.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sim-social-feed/src/Admin/pages/social-feed-settings/account-setup.admin.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sim-social-feed/src/inc/schedule.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sim-social-feed/src/inc/schedule.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sim-social-feed/src/Admin/pages/social-feed-settings/social-feed-settings.admin.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/sim-social-feed/src/WPAdminPage/pages/header.admin.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: instagram feed, instagram, instagram gallery, instagram widget, instagram photos

sim-social-feed/sim-social.php 69% from 13 tests

"Sim Social Feed" version 2.8.2'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:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("sim-social-feed.php" instead of "sim-social.php")

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,608 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP285569341,861
Markdown31350456
CSS2275210
JSON20075
HTML6006

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity14.08
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes218.18%
Methods127
▷ Static methods3527.56%
▷ Public methods12195.28%
▷ Protected methods10.79%
▷ Private methods53.94%
Functions8
▷ Named functions450.00%
▷ Anonymous functions450.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin