73% spotlight-social-photo-feeds

Code Review | Spotlight Social Feeds [Block, Shortcode, and Widget]

WordPress plugin Spotlight Social Feeds [Block, Shortcode, and Widget] scored73%from 54 tests.

About plugin

  • Plugin page: spotlight-social-...
  • Plugin version: 1.6.7
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Jun 23, 2020
  • Latest release: Nov 17, 2023
  • Number of updates: 225
  • Update frequency: every 5.5 days
  • Top authors: Mekku (98.67%)markzahra (1.78%)

Code review

54 tests

User reviews

146 reviews

Install metrics

60,000+ active /954,986 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲1.13MB] [CPU: ▲9.02ms] Passed 4 tests

Analyzing server-side resources used by Spotlight Social Feeds [Block, Shortcode, and Widget]
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.57 ▲1.1144.67 ▲4.90
Dashboard /wp-admin4.43 ▲1.1357.20 ▲8.26
Posts /wp-admin/edit.php4.48 ▲1.1357.12 ▲9.25
Add New Post /wp-admin/post-new.php7.81 ▲1.92810.33 ▲715.14
Media Library /wp-admin/upload.php4.38 ▲1.1548.12 ▲13.66
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius4.6842.96

Server storage [IO: ▲6.68MB] [DB: ▲0.08MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 685 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
fs_debug_mode
sli_api_auth_token
widget_theysaidso_widget
widget_sli-feed
can_compress_scripts
theysaidso_admin_options
fs_accounts
widget_recent-posts
widget_recent-comments
...

Browser metrics Passed 4 tests

Spotlight Social Feeds [Block, Shortcode, and Widget]: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8014.69 ▼0.021.56 ▼0.1029.53 ▼12.50
Dashboard /wp-admin2,228 ▲535.59 ▼0.0392.42 ▼5.8744.78 ▲1.30
Posts /wp-admin/edit.php2,134 ▲342.01 ▲0.0636.96 ▲1.4431.95 ▼0.17
Add New Post /wp-admin/post-new.php6,245 ▲4,71020.04 ▼3.121,000.11 ▲333.6540.14 ▼22.76
Media Library /wp-admin/upload.php1,427 ▲244.21 ▲0.0297.11 ▲0.1244.28 ▲3.03
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,1011.6625.8427.22

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/spotlight-social-photo-feeds/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 11 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_sli-feed
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • fs_accounts
    • widget_recent-comments
    • sli_api_auth_token
    • fs_active_plugins
    • ...

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
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 223× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RebelCode\\Spotlight\\Instagram\\Module' not found in wp-content/plugins/spotlight-social-photo-feeds/modules/OEmbedModule.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RebelCode\\Spotlight\\Instagram\\RestApi\\EndPoints\\AbstractEndpointHandler' not found in wp-content/plugins/spotlight-social-photo-feeds/src/core/RestApi/EndPoints/Accounts/CustomPosts/DeleteCustomMediaEndPoint.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'RebelCode\\WordPress\\Http\\Exception\\ResponseException' not found in wp-content/plugins/spotlight-social-photo-feeds/vendor/rebelcode/wp-http/src/Exception/BadResponseException.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'RebelCode\\Iris\\Data\\ImmutableDataObject' not found in wp-content/plugins/spotlight-social-photo-feeds/vendor/rebelcode/iris-engine/src/Data/Source.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'RebelCode\\Iris\\Aggregator\\AggregationStrategy' not found in wp-content/plugins/spotlight-social-photo-feeds/src/core/Engine/Aggregator/IgAggregationStrategy.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/spotlight-social-photo-feeds/vendor/rebelcode/psr7/src/DroppingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Dhii\\Exception\\ThrowableInterface' not found in wp-content/plugins/spotlight-social-photo-feeds/vendor/dhii/exception-interface/src/BadSubjectExceptionInterface.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Dhii\\Exception\\ThrowableInterface' not found in wp-content/plugins/spotlight-social-photo-feeds/vendor/dhii/transformer-interface/src/Exception/TransformerExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Dhii\\Modular\\Module\\ModuleAwareInterface' not found in wp-content/plugins/spotlight-social-photo-feeds/vendor/dhii/module-interface/src/Exception/ModuleExceptionInterface.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/spotlight-social-photo-feeds/vendor/psr/log/Psr/Log/AbstractLogger.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

spotlight-social-photo-feeds/plugin.php 92% from 13 tests

The main PHP script in "Spotlight Social Feeds [Block, Shortcode, and Widget]" version 1.6.7 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("spotlight-social-photo-feeds.php" instead of "plugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected57,993 lines of code in 600 files:
LanguageFilesBlank linesComment linesLines of code
PHP52312,89828,83954,079
JSON24002,554
CSS24434502
XML4110446
JavaScript163764220
YAML5380143
SVG30030
Markdown12019

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity14.87
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces86
Interfaces79
Traits5
Classes358
▷ Abstract classes102.79%
▷ Concrete classes34897.21%
▷ Final classes216.03%
Methods2,779
▷ Static methods45316.30%
▷ Public methods2,22079.88%
▷ Protected methods1435.15%
▷ Private methods41614.97%
Functions377
▷ Named functions12132.10%
▷ Anonymous functions25667.90%
Constants461
▷ Global constants11023.86%
▷ Class constants35176.14%
▷ Public constants33595.44%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ui/images/spotlight-favicon.png7.59KB3.19KB▼ 58.01%
ui/images/wp-logo.png4.03KB4.24KB0.00%
ui/images/spotlight-800w.png4.79KB5.10KB0.00%
ui/images/popup-link-text.png1.35KB1.28KB▼ 5.08%
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%