68% enjoy-instagram-instagram-responsive-images-gallery-and-carousel

Code Review | Enjoy Social Feed plugin for WordPress website

WordPress plugin Enjoy Social Feed plugin for WordPress website scored 68% from 54 tests.

About plugin

  • Plugin page: enjoy-instagram-i...
  • Plugin version: 6.2.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 5.8.1
  • First release: Mar 27, 2014
  • Latest release: Aug 23, 2021
  • Number of updates: 198
  • Update frequency: every 13.7 days
  • Top authors: mediabeta (65.15%)designemotions (35.35%)

Code review

54 tests

User reviews

101 reviews

Install metrics

10,000+ active / 470,770 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.48MB] [CPU: ▼150.00ms] Passed 4 tests

A check of server-side resources used by Enjoy Social Feed plugin for WordPress website
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.22 ▲0.5037.78 ▲14.05
Dashboard /wp-admin3.60 ▲0.5540.01 ▼6.88
Posts /wp-admin/edit.php3.64 ▲0.4547.12 ▼33.40
Add New Post /wp-admin/post-new.php5.89 ▲0.4692.50 ▼562.19
Media Library /wp-admin/upload.php3.51 ▲0.5139.45 ▲2.46

Server storage [IO: ▲4.89MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 106 new files
Database: 2 new tables, 89 new options
New tables
wp_enjoy_instagram_media
wp_enjoy_instagram_hashtags
New WordPress options
enjoyinstagram_lightbox_style_default
enjoyinstagram_grid_margin_default
enjoyinstagram_carousel_dots_default
enjoyinstagram_grid_lightbox_style_default
enjoyinstagram_carousel_slidespeed_default
enjoyinstagram_album_lightbox_caption_default
enjoyinstagram_grid_cols_768px_default
enjoyinstagram_carousel_link_default
enjoyinstagram_code_opt
enjoyinstagram_carousel_navigation_default
...

Browser metrics Passed 4 tests

An overview of browser requirements for Enjoy Social Feed plugin for WordPress website
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,919 ▲28216.19 ▲0.129.20 ▲0.4848.16 ▼4.36
Dashboard /wp-admin3,197 ▲2665.96 ▲0.05131.10 ▼12.91132.14 ▲21.75
Posts /wp-admin/edit.php2,772 ▲332.71 ▼0.0163.65 ▼13.0195.39 ▲11.32
Add New Post /wp-admin/post-new.php1,885 ▲21519.10 ▲0.04365.89 ▼13.45106.03 ▼1.78
Media Library /wp-admin/upload.php1,844 ▲345.02 ▲0.01146.59 ▲1.99119.18 ▼0.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_enjoy_instagram_hashtags
    • wp_enjoy_instagram_media
  • This plugin does not fully uninstall, leaving 89 options in the database
    • enjoyinstagram_grid_user
    • enjoyinstagram_grid_cols
    • enjoyinstagram_hashtag_popup_moderate
    • enjoyinstagram_grid_autoreload_default
    • enjoyinstagram_polaroid_border_color_default
    • enjoyinstagram_album_link_default
    • enjoyinstagram_carousel_user
    • enjoyinstagram_carousel_600px_default
    • enjoyinstagram_polaroid_background_default
    • enjoyinstagram_carousel_dots_default
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/templates/shortcodes/lightbox-styles/igvertical.php
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/templates/admin/shortcodes/album.php:5
    • > PHP Notice
      Undefined variable: result in wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/templates/shortcodes/lightbox-styles/igvertical.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/templates/admin/shortcodes/polaroid.php:5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/templates/shortcodes/lightbox-styles/igvertical.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function enjoyinstagram() in wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/templates/admin/shortcodes/carousel.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/plugin-options/options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function enjoyinstagram() in wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/templates/admin/diagnostic.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function enjoyinstagram() in wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/templates/admin/shortcodes/grid.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/enjoyinstagram.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/templates/admin/shortcodes/badge.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed: Please take inspiration from this readme.txt

enjoy-instagram-instagram-responsive-images-gallery-and-carousel/enjoyinstagram.php 85% from 13 tests

"Enjoy Social Feed plugin for WordPress website" version 6.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("enjoy-instagram-instagram-responsive-images-gallery-and-carousel.php" instead of "enjoyinstagram.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected18,707 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript171,7634108,851
CSS227501295,217
PHP287111,1254,595
XML16125
SVG30019

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity22.82
▷ Minimum class complexity3.00
▷ Maximum class complexity51.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes327.27%
Methods105
▷ Static methods76.67%
▷ Public methods9691.43%
▷ Protected methods32.86%
▷ Private methods65.71%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
19 PNG files occupy 0.17MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/arrow_up.png1.03KB0.23KB▼ 77.65%
assets/images/grid-view.png1.01KB0.61KB▼ 39.40%
assets/images/carousel.png2.48KB1.79KB▼ 27.91%
assets/images/icon_enjoyinstagram.png0.46KB0.32KB▼ 31.09%
assets/images/buymeacoffee.png2.65KB1.64KB▼ 38.01%