83% post-carousel-slider

Code Review | Post Carousel Slider

WordPress plugin Post Carousel Slider scored83%from 54 tests.

About plugin

  • Plugin page: post-carousel-slider
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Aug 2, 2014
  • Latest release: Dec 30, 2016
  • Number of updates: 10
  • Update frequency: every 88.2 days
  • Top authors: hemant29 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

50+ active /7,733 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.02ms] Passed 4 tests

A check of server-side resources used by Post Carousel Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.49 ▲1.36
Dashboard /wp-admin3.34 ▲0.0344.49 ▼7.99
Posts /wp-admin/edit.php3.39 ▲0.0344.04 ▼3.42
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.64 ▲5.99
Media Library /wp-admin/upload.php3.26 ▲0.0340.51 ▲7.66

Server storage [IO: ▲0.10MB] [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: 8 new files
Database: no new tables, 18 new options
New WordPress options
widget_theysaidso_widget
tn_autoplay
db_upgraded
tn_word_limit
tn_showimage
tn_maxSlides
tn_mode
tn_order
theysaidso_admin_options
tn_speed
...

Browser metrics Passed 4 tests

Checking browser requirements for Post Carousel Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲16713.44 ▼1.089.63 ▲8.0241.37 ▼4.15
Dashboard /wp-admin2,213 ▲365.56 ▼0.1082.58 ▼18.2068.07 ▲23.48
Posts /wp-admin/edit.php2,132 ▲322.12 ▲0.1139.05 ▲2.6028.89 ▼5.94
Add New Post /wp-admin/post-new.php1,700 ▲17222.30 ▼1.06743.99 ▲44.8177.54 ▲21.70
Media Library /wp-admin/upload.php1,429 ▲324.21 ▲0.08110.91 ▲10.3447.58 ▲1.91

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
  • This plugin did not uninstall successfully, leaving 18 options in the database
    • tn_orderby
    • tn_query_post
    • tn_word_limit
    • widget_recent-comments
    • widget_theysaidso_widget
    • tn_showimage
    • tn_maxSlides
    • tn_speed
    • can_compress_scripts
    • tn_order
    • ...

Smoke tests 75% 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 50% 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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/post-carousel-slider/post-carousel-slider.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/post-carousel-slider/setting.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === post-carousel-slider === )
  • Tags: Please delete some tags, you are using 29 tag instead of maximum 10
The official readme.txt is a good inspiration

post-carousel-slider/post-carousel-slider.php Passed 13 tests

Analyzing the main PHP file in "Post Carousel Slider" version 2.0.1
57 characters long description:
A simple plugin to show a horizontal post carousel silder

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
Success! There were no dangerous files found in this plugin2,140 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS236511,153
JavaScript167465784
PHP23735203

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.63KB0.61KB▼ 3.27%
(invalid) images/default.png2.81KB0.00KB▼ 100.00%