78% smart-post-slider

Code Review | post slider

WordPress plugin post slider scored78%from 54 tests.

About plugin

  • Plugin page: smart-post-slider
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Sep 29, 2016
  • Latest release: Jun 24, 2019
  • Number of updates: 38
  • Update frequency: every 26.3 days
  • Top authors: quazisazzad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,274 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.44ms] Passed 4 tests

Server-side resources used by post slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.65 ▼4.24
Dashboard /wp-admin3.37 ▲0.0347.48 ▼14.89
Posts /wp-admin/edit.php3.49 ▲0.1347.21 ▼2.53
Add New Post /wp-admin/post-new.php5.95 ▲0.0787.20 ▼20.09
Media Library /wp-admin/upload.php3.30 ▲0.0740.11 ▲7.65

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 15 new options
New WordPress options
db_upgraded
speed
navigation
can_compress_scripts
widget_recent-posts
bg_color
widget_theysaidso_widget
pagination
singleitem
stop
...

Browser metrics Passed 4 tests

An overview of browser requirements for post slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲21814.01 ▼0.559.53 ▲7.7540.40 ▼1.24
Dashboard /wp-admin2,227 ▲474.89 ▼0.74110.69 ▲20.7147.44 ▲4.14
Posts /wp-admin/edit.php2,140 ▲372.33 ▲0.2841.90 ▲1.7434.83 ▼4.83
Add New Post /wp-admin/post-new.php1,553 ▲623.27 ▲0.23665.81 ▼10.7835.89 ▼16.17
Media Library /wp-admin/upload.php1,435 ▲354.44 ▲0.23103.76 ▼5.8445.67 ▲2.77

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 were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/smart-post-slider/assets/style/style.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/smart-post-slider/includes/smart_post_slider_shortcode.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-post-slider/admin/smart_post_slider_admin_setting.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/smart-post-slider/includes/smart_post_slider_script.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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: The official readme.txt is a good inspiration

smart-post-slider/smart-post-slider.php 92% from 13 tests

The primary PHP file in "post slider" version 1.5 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,776 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2208171,291
PHP67745367
CSS21418118

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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