58% post-carousel

Code Review | Post Grid, Post Carousel, & List Category Posts – by Smart Post Show

WordPress plugin Post Grid, Post Carousel, & List Category Posts – by Smart Post Show scored58%from 54 tests.

About plugin

  • Plugin page: post-carousel
  • Plugin version: 2.4.25
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2016
  • Latest release: Nov 9, 2023
  • Number of updates: 107
  • Update frequency: every 24.5 days
  • Top authors: shapedplugin (50.47%)rubel_miah (47.66%)Shamimmiashuhagh (3.74%)

Code review

54 tests

User reviews

157 reviews

Install metrics

20,000+ active /458,199 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.29MB] [CPU: ▲5.58ms] Passed 4 tests

An overview of server-side resources used by Post Grid, Post Carousel, & List Category Posts – by Smart Post Show
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.77 ▲1.3047.82 ▲4.78
Dashboard /wp-admin4.60 ▲1.2951.17 ▲5.91
Posts /wp-admin/edit.php4.65 ▲1.2959.45 ▲11.00
Add New Post /wp-admin/post-new.php7.20 ▲1.30101.30 ▲4.08
Media Library /wp-admin/upload.php4.52 ▲1.2942.20 ▲7.54
Replace Layout /wp-admin/edit.php?post_type=sp_post_carousel&page=pcp_replace_layout6.7652.55
Manage Shows /wp-admin/edit.php?post_type=sp_post_carousel6.8362.30
Settings /wp-admin/edit.php?post_type=sp_post_carousel&page=pcp_settings6.7648.25
Add New /wp-admin/post-new.php?post_type=sp_post_carousel6.8285.20
Help /wp-admin/edit.php?post_type=sp_post_carousel&page=pcp_help6.7660.26
Tools /wp-admin/edit.php?post_type=sp_post_carousel&page=pcp_tools6.7674.22

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 173 new files
Database: no new tables, 14 new options
New WordPress options
can_compress_scripts
db_upgraded
smart_post_show_review_notice_dismiss
smart_post_show_version
smart_post_show_activation_date
widget_theysaidso_widget
smart_post_show_first_version
sp_post_carousel_tools
theysaidso_admin_options
widget_recent-posts
...

Browser metrics Passed 4 tests

Post Grid, Post Carousel, & List Category Posts – by Smart Post Show: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11614.39 ▲0.281.59 ▼0.4032.71 ▼12.53
Dashboard /wp-admin2,280 ▲1065.61 ▲0.0795.78 ▼0.8439.88 ▼2.62
Posts /wp-admin/edit.php2,189 ▲892.00 ▼0.1540.65 ▼1.7035.79 ▼1.55
Add New Post /wp-admin/post-new.php6,244 ▲4,71819.03 ▼3.85887.58 ▲207.8957.48 ▼2.66
Media Library /wp-admin/upload.php1,485 ▲854.22 ▲0.0399.36 ▼14.0144.77 ▼1.44
Replace Layout /wp-admin/edit.php?post_type=sp_post_carousel&page=pcp_replace_layout1,4344.6078.9269.57
Manage Shows /wp-admin/edit.php?post_type=sp_post_carousel1,4354.3058.4329.34
Settings /wp-admin/edit.php?post_type=sp_post_carousel&page=pcp_settings1,3364.3663.8535.82
Add New /wp-admin/post-new.php?post_type=sp_post_carousel7,2935.28155.66158.75
Help /wp-admin/edit.php?post_type=sp_post_carousel&page=pcp_help2,05210.69330.21147.78
Tools /wp-admin/edit.php?post_type=sp_post_carousel&page=pcp_tools1,2334.3359.3898.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Compile error in wp-content/plugins/post-carousel/main.php+38
    Cannot redeclare activate_smart_post_show() (previously declared in wp-content/plugins/post-carousel/main.php:39)
  • The plugin did not uninstall successfully, leaving 173 files (2.77MB) in the plugin directory
    • (new file) admin/ElementAddons_Deprecated/Shortcode_Widget_Deprecated.php
    • (new file) admin/GutenbergBlock/assets/smart-post-show-icon.svg
    • (new file) admin/assets/css/fontello.min.css
    • (new file) admin/GutenbergBlock/class-smart-post-show-gutenberg-block-init.php
    • (new file) admin/assets/css/help-page.css
    • (new file) admin/assets/css/fontello.css
    • (new file) admin/GutenbergBlock/build/index.asset.php
    • (new file) admin/GutenbergBlock/assets/smart-post-show-block-preview.svg
    • (new file) admin/ElementAddons/Shortcode_Widget.php
    • (new file) admin/GutenbergBlock/build/index.js
    • ...
  • Zombie WordPress options were found after uninstall: 15 options
    • db_upgraded
    • widget_theysaidso_widget
    • smart_post_show_first_version
    • smart_post_show_db_version
    • sp_post_carousel_tools
    • theysaidso_admin_options
    • sp_post_carousel_settings
    • sp_post_carousel_rpl
    • widget_recent-posts
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sp_post_carousel&page=pcp_help
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/post-carousel/includes/updates/update-2.2.0.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-carousel/admin/preview/class-spsp-preview.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/post-carousel/admin/ElementAddons_Deprecated/Shortcode_Widget_Deprecated.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-carousel/admin/class-smart-post-show-element-shortcode-addons-deprecated.php:138
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/post-carousel/includes/updates/update-2.4.13.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'SP_PC_Functions' not found in wp-content/plugins/post-carousel/public/dynamic-css/carousel-css.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-carousel/admin/views/notices/review.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/post-carousel/admin/ElementAddons/Shortcode_Widget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-carousel/admin/class-smart-post-show-element-shortcode-addons.php:138

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 43 tag instead of maximum 10
You can take inspiration from this readme.txt

post-carousel/main.php 85% from 13 tests

The principal PHP file in "Post Grid, Post Carousel, & List Category Posts – by Smart Post Show" v. 2.4.25 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 207 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("post-carousel.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin31,490 lines of code in 153 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript112,32660813,162
PHP911,5473,4969,198
CSS161,1106036,212
SVG35032,918

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity15.68
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes73
▷ Abstract classes22.74%
▷ Concrete classes7197.26%
▷ Final classes00.00%
Methods262
▷ Static methods7428.24%
▷ Public methods24794.27%
▷ Protected methods41.53%
▷ Private methods114.20%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants7
▷ Global constants7100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/img/placeholder.png5.54KB2.79KB▼ 49.61%
admin/views/sp-framework/assets/img/checkerboard.png2.29KB2.54KB0.00%
admin/assets/img/sps-badge.png1.42KB1.42KB0.00%