78% posts-slider

Code Review | Post Slider

WordPress plugin Post Slider scored78%from 54 tests.

About plugin

  • Plugin page: posts-slider
  • Plugin version: 2.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.2
  • WordPress version: 6.3.1
  • First release: Sep 9, 2014
  • Latest release: Oct 2, 2019
  • Number of updates: 281
  • Update frequency: every 6.8 days
  • Top authors: umarbajwa (99.64%)

Code review

54 tests

User reviews

22 reviews

Install metrics

200+ active /54,182 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Post Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0438.64 ▼4.02
Dashboard /wp-admin3.33 ▲0.0341.40 ▼10.63
Posts /wp-admin/edit.php3.38 ▲0.0340.20 ▼6.02
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.60 ▲10.89
Media Library /wp-admin/upload.php3.26 ▲0.0338.58 ▲6.98
Add New /wp-admin/post-new.php?post_type=mpsp_slider3.3041.59
All Posts Sliders /wp-admin/edit.php?post_type=mpsp_slider3.3036.32

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Post Slider: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲12813.32 ▼1.081.79 ▲0.0236.51 ▼11.89
Dashboard /wp-admin2,244 ▲565.87 ▲0.95111.11 ▼4.2047.48 ▲3.44
Posts /wp-admin/edit.php2,126 ▲372.01 ▲0.0137.19 ▲2.8736.88 ▼0.26
Add New Post /wp-admin/post-new.php1,568 ▲3523.14 ▲0.09650.40 ▲47.7646.04 ▲2.62
Media Library /wp-admin/upload.php1,417 ▲294.30 ▲0.0898.01 ▲2.7441.30 ▲0.79
Add New /wp-admin/post-new.php?post_type=mpsp_slider2,8143.2293.04105.07
All Posts Sliders /wp-admin/edit.php?post_type=mpsp_slider1,0791.9330.3531.83

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/posts-slider/css/slider_settings.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/posts-slider/mpsp_slider_generator.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/posts-slider/askrev.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/posts-slider/mpsp_shortcode_gen.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts-slider/mpsp_cs_post_type.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/posts-slider/mpsp_scripts.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts-slider/mpsp_metaboxes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts-slider/mpsp_cs_post_type.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Too many tags (84 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

posts-slider/Posts-Slider.php 92% from 13 tests

"Post Slider" version 2.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("posts-slider.php" instead of "Posts-Slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,348 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2207171,291
PHP1336950689
CSS44828368

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/layout-def.png5.91KB2.19KB▼ 62.97%
owl-carousel/grabbing.png0.11KB0.14KB0.00%
(invalid) img/._layout-def.png11.82KB0.00KB▼ 100.00%
(invalid) img/._layout-1.png14.67KB0.00KB▼ 100.00%
img/layout-1.png8.93KB3.02KB▼ 66.21%