78% catch-instagram-feed-gallery-widget

Code Review | Social Gallery and Widget

WordPress plugin Social Gallery and Widget scored78%from 54 tests.

About plugin

  • Plugin page: catch-instagram-f...
  • Plugin version: 2.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 21, 2017
  • Latest release: Sep 1, 2023
  • Number of updates: 36
  • Update frequency: every 58.6 days
  • Top authors: catchthemes (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20,000+ active /462,471 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.58ms] Passed 4 tests

Server-side resources used by Social Gallery and Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.49 ▲3.99
Dashboard /wp-admin3.36 ▲0.0651.72 ▲0.28
Posts /wp-admin/edit.php3.41 ▲0.0551.09 ▲1.79
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.29 ▼12.39
Media Library /wp-admin/upload.php3.28 ▲0.0536.86 ▲4.14

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 50 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_catch-instagram-feed-gallery-widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Social Gallery and Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,011 ▲26514.02 ▼0.379.74 ▲7.7543.99 ▼1.53
Dashboard /wp-admin2,312 ▲1245.85 ▲0.99113.34 ▲2.6382.34 ▲45.26
Posts /wp-admin/edit.php2,192 ▲1062.06 ▲0.0736.77 ▼2.6937.06 ▲1.81
Add New Post /wp-admin/post-new.php6,291 ▲4,77219.21 ▼4.17878.64 ▲203.5837.62 ▼19.93
Media Library /wp-admin/upload.php1,485 ▲944.24 ▲0.13102.03 ▼11.7277.48 ▲27.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_catch-instagram-feed-gallery-widget
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/catch-instagram-feed-gallery-widget/public/partials/catch-instagram-feed-gallery-widget-public-display.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/catch-instagram-feed-gallery-widget/includes/class-catch-instagram-feed-gallery-widget-widget.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/catch-instagram-feed-gallery-widget/includes/instagram-block/index.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/catch-instagram-feed-gallery-widget/admin/partials/catch-instagram-feed-gallery-widget-admin-display.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/catch-instagram-feed-gallery-widget/admin/partials/CatchThemesThemePlugin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/catch-instagram-feed-gallery-widget/includes/ctp-tabs-removal.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-instagram-feed-gallery-widget/admin/partials/sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/catch-instagram-feed-gallery-widget/admin/partials/footer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/catch-instagram-feed-gallery-widget/includes/class-catch-instagram-feed-gallery-widget-add-editor-button.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/catch-instagram-feed-gallery-widget/includes/class-catch-instagram-feed-gallery-widget-shortcode.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: instagram gallery, simple instagram feed gallery and widget, instagram widget, instagram feed, instagram

catch-instagram-feed-gallery-widget/catch-instagram-feed-gallery-widget.php 92% from 13 tests

The primary PHP file in "Social Gallery and Widget" version 2.3.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 213 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected3,336 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP214378711,765
CSS519034982
PO File1129167386
JavaScript74173202
SVG1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods54
▷ Static methods35.56%
▷ Public methods4990.74%
▷ Protected methods00.00%
▷ Private methods59.26%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/premium-plugin-246x116.png9.01KB4.16KB▼ 53.83%
admin/images/free-plugin-246x116.png8.01KB3.81KB▼ 52.42%