77% feed-instagram-lite

Code Review | Gallery for Social Photo

WordPress plugin Gallery for Social Photo scored77%from 54 tests.

About plugin

  • Plugin page: feed-instagram-lite
  • Plugin version: 1.0.0.31
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: Aug 30, 2016
  • Latest release: Aug 9, 2023
  • Number of updates: 101
  • Update frequency: every 25.1 days
  • Top authors: GhozyLab (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /44,561 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.54MB] [CPU: ▼2.62ms] 75% from 4 tests

A check of server-side resources used by Gallery for Social Photo
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 845.88ms on /wp-admin/edit.php?post_type=ginstagramfeed&page=ghozylab-premium-plugins)
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2740.49 ▲1.55
Dashboard /wp-admin3.98 ▲0.6449.69 ▼11.12
Posts /wp-admin/edit.php4.03 ▲0.6749.57 ▲0.50
Add New Post /wp-admin/post-new.php6.55 ▲0.6688.81 ▼1.39
Media Library /wp-admin/upload.php3.84 ▲0.6138.06 ▲5.53
Upgrade to PRO /wp-admin/edit.php?post_type=ginstagramfeed&page=ghozylab-instagram-comparison3.8442.35
All Feeds /wp-admin/edit.php?post_type=ginstagramfeed3.8843.84
Documentation /wp-admin/edit.php?post_type=ginstagramfeed&page=ghozylab-instagram-docs3.8437.37
Add New Feed /wp-admin/post-new.php?post_type=ginstagramfeed3.8854.90
Free Plugins /wp-admin/edit.php?post_type=ginstagramfeed&page=ghozylab-free-plugins3.94655.99
Settings /wp-admin/edit.php?post_type=ginstagramfeed&page=ghozylab-instagram-settings3.8439.23
Premium Plugins /wp-admin/edit.php?post_type=ginstagramfeed&page=ghozylab-premium-plugins3.93845.88

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 171 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
ghozylab_instagram_feed_options
widget_theysaidso_widget
can_compress_scripts
widget_gifeed-widget

Browser metrics Passed 4 tests

Gallery for Social Photo: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲19313.57 ▼0.788.68 ▲6.9436.23 ▼7.71
Dashboard /wp-admin2,255 ▲1005.95 ▲0.26109.52 ▼8.4580.17 ▲38.55
Posts /wp-admin/edit.php2,138 ▲492.01 ▲0.0039.85 ▲5.0134.13 ▼3.31
Add New Post /wp-admin/post-new.php6,310 ▲4,78118.81 ▲0.49814.03 ▲178.5959.36 ▼7.13
Media Library /wp-admin/upload.php1,434 ▲494.18 ▲0.0696.53 ▼3.8971.57 ▲28.28
Upgrade to PRO /wp-admin/edit.php?post_type=ginstagramfeed&page=ghozylab-instagram-comparison1,7323.6160.84121.22
All Feeds /wp-admin/edit.php?post_type=ginstagramfeed1,1091.9537.2228.15
Documentation /wp-admin/edit.php?post_type=ginstagramfeed&page=ghozylab-instagram-docs1,60710.69337.48113.01
Add New Feed /wp-admin/post-new.php?post_type=ginstagramfeed1,1623.8762.5696.68
Free Plugins /wp-admin/edit.php?post_type=ginstagramfeed&page=ghozylab-free-plugins1,6273.6248.86102.57
Settings /wp-admin/edit.php?post_type=ginstagramfeed&page=ghozylab-instagram-settings1,1293.5949.1380.35
Premium Plugins /wp-admin/edit.php?post_type=ginstagramfeed&page=ghozylab-premium-plugins1,1403.6147.7266.69

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% 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
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_gifeed-widget
    • ghozylab_instagram_feed_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 15× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/feed-instagram-lite/inc/admin/gifeed-tinymce.php
    • > /wp-content/plugins/feed-instagram-lite/inc/admin/gifeed-script-loader.php
    • > /wp-content/plugins/feed-instagram-lite/inc/admin/pages/gifeed-docs-page.php
    • > /wp-content/plugins/feed-instagram-lite/inc/admin/functions/gifeed-admin-functions.php
    • > /wp-content/plugins/feed-instagram-lite/inc/admin/gifeed-settings.php
    • > /wp-content/plugins/feed-instagram-lite/inc/admin/functions/gifeed-preview.php
    • > /wp-content/plugins/feed-instagram-lite/inc/admin/gifeed-custom-post.php
    • > /wp-content/plugins/feed-instagram-lite/inc/frontend/gifeed-template-helper.php
    • > /wp-content/plugins/feed-instagram-lite/inc/frontend/gifeed-opt-loader.php
    • > /wp-content/plugins/feed-instagram-lite/inc/frontend/gifeed-template.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/feed-instagram-lite/inc/admin/vc/vc-shortcode.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/feed-instagram-lite/inc/admin/gifeed-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: Please a description for screenshot #6 in feed-instagram-lite/assets to your readme.txt
The official readme.txt might help

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

"Gallery for Social Photo" version 1.0.0.31's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 170 characters long)

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin11,476 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
CSS248383775,583
PHP251,2453133,423
JavaScript13203591,268
SVG400667
PO File1200232535

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity5.50
▷ Minimum class complexity5.00
▷ Maximum class complexity6.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions84
▷ Named functions8196.43%
▷ Anonymous functions33.57%
Constants13
▷ Global constants13100.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
77 PNG files occupy 0.32MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/admin/img/metabox/valid.png1.02KB0.16KB▼ 84.64%
inc/admin/img/comparison/no.png3.79KB0.46KB▼ 87.74%
inc/admin/img/comparison/yes.png3.20KB0.50KB▼ 84.22%
inc/admin/css/jquery/ui/images/ui-bg_fine-grain_10_f8f7f6_60x60.png9.67KB1.25KB▼ 87.10%
inc/admin/img/metabox/invalid.png0.81KB0.69KB▼ 15.20%