10% my-instagram-feed

Code Review | Easy Social Photos Gallery - MIF

WordPress plugin Easy Social Photos Gallery - MIF scored10%from 54 tests.

About plugin

  • Plugin page: my-instagram-feed
  • Plugin version: 3.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-6.2
  • WordPress version: 6.3.1
  • First release: Jul 14, 2018
  • Latest release: Jul 18, 2023
  • Number of updates: 60
  • Update frequency: every 30.5 days
  • Top authors: DaNish Ali (86.67%)maltathemes (15%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /4,627 total downloads

Benchmarks

Plugin footprint 39% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/my-instagram-feed/includes/mif-helper-functions.php+21
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲5.43MB] [CPU: ▲27.06ms] 75% from 4 tests

An overview of server-side resources used by Easy Social Photos Gallery - MIF
Please have a look at the following items
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.43MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.20 ▲5.7466.95 ▲25.18
Dashboard /wp-admin9.22 ▲5.9282.03 ▲29.81
Posts /wp-admin/edit.php9.22 ▲5.8776.72 ▲23.30
Add New Post /wp-admin/post-new.php10.10 ▲4.22122.66 ▲29.93
Media Library /wp-admin/upload.php9.22 ▲5.9979.10 ▲41.93
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2262.69

Server storage [IO: ▲4.99MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/my-instagram-feed/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 283 new files
Database: no new tables, 10 new options
New WordPress options
fs_active_plugins
mif_settings
can_compress_scripts
fs_debug_mode
widget_recent-posts
widget_theysaidso_widget
db_upgraded
fs_accounts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Social Photos Gallery - MIF
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲20713.65 ▼0.695.67 ▲3.8329.56 ▼17.32
Dashboard /wp-admin2,242 ▲425.84 ▼0.04112.65 ▲2.7077.24 ▲35.81
Posts /wp-admin/edit.php2,141 ▲442.01 ▼0.0236.58 ▲0.3837.65 ▲1.79
Add New Post /wp-admin/post-new.php1,554 ▲1421.97 ▲3.76723.96 ▲115.6752.31 ▼5.97
Media Library /wp-admin/upload.php1,437 ▲374.14 ▼0.11105.31 ▲1.4885.53 ▲43.45
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1051.6925.4526.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/my-instagram-feed/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • fs_active_plugins
    • fs_accounts
    • db_upgraded
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_theysaidso_widget
    • can_compress_scripts
    • mif_settings
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/my-instagram-feed/frontend/assets/css/my-instagram-feed-customizer-style.css.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/my-instagram-feed/frontend/views/html-feed-footer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/my-instagram-feed/frontend/views/html-post-header.php:3
    • > PHP Warning
      include(ABSPATH/wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/my-instagram-feed/frontend/assets/css/my-instagram-feed-customizer-style.css.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/my-instagram-feed/frontend/views/html-feed-header.php:5
    • > PHP Warning
      include(): Failed opening 'ABSPATH/wp-load.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/my-instagram-feed/frontend/assets/css/my-instagram-feed-customizer-style.css.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mif_get_setting() in wp-content/plugins/my-instagram-feed/frontend/views/feed.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (20 tag instead of maximum 10)
  • Screenshots: Add descriptions for screenshots #10, #11, #12, #8, #9 in my-instagram-feed/assets to your readme.txt
The official readme.txt might help

my-instagram-feed/my-instagram-feed.php 92% from 13 tests

The entry point to "Easy Social Photos Gallery - MIF" version 3.1.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 391 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin47,087 lines of code in 225 files:
LanguageFilesBlank linesComment linesLines of code
PHP1379,14017,98238,181
Sass522,6043416,669
JavaScript117396091,857
Markdown1680214
CSS231627135
SVG11031

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity77.53
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes60
▷ Abstract classes23.33%
▷ Concrete classes5896.67%
▷ Final classes00.00%
Methods1,313
▷ Static methods19715.00%
▷ Public methods92470.37%
▷ Protected methods171.29%
▷ Private methods37228.33%
Functions118
▷ Named functions11294.92%
▷ Anonymous functions65.08%
Constants150
▷ Global constants10368.67%
▷ Class constants4731.33%
▷ Public constants47100.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
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/plugin_icon.png0.70KB0.69KB▼ 1.40%
frontend/assets/images/esf-insta-video-placeholder.png9.72KB1.11KB▼ 88.54%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
admin/assets/images/insta-logo.png1.82KB1.48KB▼ 18.65%