89% wp-posts-carousel

Code Review | WP Posts Carousel

WordPress plugin WP Posts Carousel scored89%from 54 tests.

About plugin

  • Plugin page: wp-posts-carousel
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.5.1
  • WordPress version: 6.3.1
  • First release: May 5, 2015
  • Latest release: Oct 13, 2020
  • Number of updates: 79
  • Update frequency: every 25.2 days
  • Top authors: teastudio.pl (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

5,000+ active /82,188 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.25MB] [CPU: ▼3.02ms] Passed 4 tests

This is a short check of server-side resources used by WP Posts Carousel
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2438.96 ▼2.53
Dashboard /wp-admin3.55 ▲0.2445.89 ▼2.61
Posts /wp-admin/edit.php3.66 ▲0.3042.94 ▼3.12
Add New Post /wp-admin/post-new.php6.15 ▲0.2684.94 ▼3.82
Media Library /wp-admin/upload.php3.47 ▲0.2435.67 ▲0.58
WP Posts Carousel /wp-admin/options-general.php?page=wp-posts-carousel3.4431.84

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_wp_posts_carousel
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP Posts Carousel
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲12813.51 ▼0.779.54 ▲7.7736.64 ▼18.09
Dashboard /wp-admin2,205 ▲255.60 ▼0.0587.22 ▼10.8037.42 ▼4.54
Posts /wp-admin/edit.php2,110 ▲312.07 ▲0.0339.63 ▲0.4836.20 ▲0.36
Add New Post /wp-admin/post-new.php1,535 ▲723.11 ▼0.06607.97 ▼10.5383.59 ▲22.78
Media Library /wp-admin/upload.php1,410 ▲74.26 ▼0.0598.36 ▼5.4442.66 ▼2.64
WP Posts Carousel /wp-admin/options-general.php?page=wp-posts-carousel9902.1626.4125.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_wp_posts_carousel
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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 SRP test was a success

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Widget configuration), #2 (Shortcode generator), #3 (WYSIWYG button), #4 (Settings page), #5 (Example of usage)
The official readme.txt is a good inspiration

wp-posts-carousel/wp-posts-carousel.php 92% from 13 tests

"WP Posts Carousel" version 1.3.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 201 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected4,350 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript74939281,985
PHP81782341,589
CSS638102468
PO File1120132308

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity25.83
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity5.14
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods36
▷ Static methods1644.44%
▷ Public methods3597.22%
▷ Protected methods00.00%
▷ Private methods12.78%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.52MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png247.89KB81.24KB▼ 67.23%
screenshot-1.png84.43KB31.99KB▼ 62.11%
images/placeholder.png3.61KB3.64KB0.00%
screenshot-4.png123.72KB50.95KB▼ 58.82%
images/teastudio-logo.png4.23KB2.93KB▼ 30.76%