68% ig-posts-carousel

Code Review | IG Posts Carousel

WordPress plugin IG Posts Carousel scored 68% from 54 tests.

About plugin

  • Plugin page: ig-posts-carousel
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 5.8.1
  • First release: Jun 19, 2016
  • Latest release: Mar 20, 2017
  • Number of updates: 14
  • Update frequency: every 19.7 days
  • Top authors: iografica (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 6,695 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.97MB] [CPU: ▼175.19ms] Passed 4 tests

This is a short check of server-side resources used by IG Posts Carousel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.62 ▼0.1016.12 ▼4.99
Dashboard /wp-admin2.68 ▼0.3818.84 ▼28.75
Posts /wp-admin/edit.php2.68 ▼0.4317.84 ▼27.20
Add New Post /wp-admin/post-new.php2.68 ▼2.7616.20 ▼629.63
Media Library /wp-admin/upload.php2.68 ▼0.3317.89 ▼15.16
IG Posts Carousel /wp-admin/admin.php?page=ig-posts-carousel2.6819.10
Getting Started /wp-admin/admin.php?page=ig-posts-carousel-getting-started2.6818.28

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 1 new option
New WordPress options
widget_ig_posts_carousel_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for IG Posts Carousel
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,821 ▲22516.67 ▲1.0112.71 ▼1.2251.14 ▲1.32
Dashboard /wp-admin2,999 ▲685.91 ▼0.25144.17 ▼19.16110.00 ▲0.05
Posts /wp-admin/edit.php2,768 ▲292.72 ▲0.0165.82 ▲0.9684.42 ▼5.23
Add New Post /wp-admin/post-new.php1,634 ▲1921.42 ▲0.02297.68 ▼7.7896.84 ▼19.51
Media Library /wp-admin/upload.php1,836 ▲295.03 ▲0.01157.31 ▲5.65109.58 ▼0.63
IG Posts Carousel /wp-admin/admin.php?page=ig-posts-carousel1,1122.0955.6879.90
Getting Started /wp-admin/admin.php?page=ig-posts-carousel-getting-started1,1622.0660.9489.63

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
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/ig-posts-carousel/includes/ig-posts-carousel-function.php+7
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_ig_posts_carousel_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ig-posts-carousel-getting-started
    • > Notice in wp-content/plugins/ig-posts-carousel/includes/ig-posts-carousel-function.php+10
    Trying to access array offset on value of type bool

SRP 50% 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
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ig-posts-carousel/includes/widgets/ig-posts-carousel-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/ig-posts-carousel/includes/admin/welcome/sections/welcome-intro.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ig-posts-carousel/includes/admin/welcome-screen.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ig-posts-carousel/includes/admin/ig-posts-carousel-settings.php:149
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ig-posts-carousel/includes/ig-posts-carousel-function.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ig-posts-carousel/includes/shortcodes/ig-posts-carousel-shortcodes.php:147

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% 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: Please delete some tags, you are using 14 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Posts and products Carousel), #2 (IG Posts Carousel settings, widget and shortcode)
The official readme.txt might help

ig-posts-carousel/ig-posts-carousel.php Passed 13 tests

Analyzing the main PHP file in "IG Posts Carousel" version 1.7
75 characters long description:
Easily add a responsive carousel of recent posts and products to WordPress.

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
No dangerous file extensions were detected3,317 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3828492,061
PHP74562592
CSS2535336
Sass4266315
SVG11013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity20.67
▷ Minimum class complexity5.00
▷ Maximum class complexity48.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin