83% bdthemes-prime-slider-lite

Code Review | Prime Slider - Addons For Elementor (Revolution of a slider, Hero Slider, Media Slider, Drag Drop Slider, Video Slider, Product Slider, Ecommerce Slider)

WordPress plugin Prime Slider - Addons For Elementor (Revolution of a slider, Hero Slider, Media Slider, Drag Drop Slider, Video Slider, Product Slider, Ecommerce Slider) scored83%from 54 tests.

About plugin

  • Plugin page: bdthemes-prime-sl...
  • Plugin version: 3.11.2
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 7, 2019
  • Latest release: Nov 29, 2023
  • Number of updates: 160
  • Update frequency: every 9.5 days
  • Top authors: bdthemes (97.5%)mohammaadfarid (3.13%)

Code review

54 tests

User reviews

32 reviews

Install metrics

80,000+ active /1,666,767 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼7.11ms] Passed 4 tests

A check of server-side resources used by Prime Slider - Addons For Elementor (Revolution of a slider, Hero Slider, Media Slider, Drag Drop Slider, Video Slider, Product Slider, Ecommerce Slider)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1333.95 ▼5.94
Dashboard /wp-admin3.44 ▲0.1449.11 ▲0.23
Posts /wp-admin/edit.php3.56 ▲0.2046.86 ▼0.70
Add New Post /wp-admin/post-new.php6.02 ▲0.1479.51 ▼22.03
Media Library /wp-admin/upload.php3.37 ▲0.1434.78 ▲3.57

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 443 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Prime Slider - Addons For Elementor (Revolution of a slider, Hero Slider, Media Slider, Drag Drop Slider, Video Slider, Product Slider, Ecommerce Slider)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.24 ▼0.141.61 ▼0.1336.15 ▼6.36
Dashboard /wp-admin2,204 ▲305.53 ▼0.0497.12 ▼9.9042.90 ▼3.79
Posts /wp-admin/edit.php2,109 ▲91.94 ▼0.0042.74 ▲3.5635.35 ▼4.53
Add New Post /wp-admin/post-new.php1,532 ▼823.13 ▼0.02583.55 ▼76.9255.20 ▼2.73
Media Library /wp-admin/upload.php1,406 ▲34.19 ▼0.0297.41 ▼5.1642.77 ▼0.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% 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 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
Please fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant BDTPS_CORE__FILE__ - assumed 'BDTPS_CORE__FILE__' (this will throw an Error in a future version of PHP) in wp-content/plugins/bdthemes-prime-slider-lite/includes/helper.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bdthemes-prime-slider-lite/includes/helper.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bdthemes-prime-slider-lite/includes/helper.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PrimeSlider\\add_action() in wp-content/plugins/bdthemes-prime-slider-lite/admin/admin-notice.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'PrimeSlider_Settings_API' not found in wp-content/plugins/bdthemes-prime-slider-lite/admin/admin-settings.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% 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 need to be fixed:
  • Screenshots: These screenshots require images: #1 (Prime Slider Intro), #2 (Best features in prime slider), #3 (Widget demo of prime slider), #4 (General Slider demo), #5 (Slider Example 5.), #6 (Slider Example 6.), #7 (Slider Example 7.), #8 (Slider Example 8.), #9 (Slider Example 9.), #10 (Slider Example 10.), #11 (Slider Example 11.), #12 (Slider Example 12.), #13 (Slider Example 13.), #14 (Slider Example 14.), #15 (Prime Slider features), #16 (Prime Slider features), #17 (Prime Slider features), #18 (Check our others popular plugins)
You can look at the official readme.txt

bdthemes-prime-slider-lite/bdthemes-prime-slider.php 77% from 13 tests

The main file in "Prime Slider - Addons For Elementor (Revolution of a slider, Hero Slider, Media Slider, Drag Drop Slider, Video Slider, Product Slider, Ecommerce Slider)" v. 3.11.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0.0" instead of "3.0.0")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bdthemes-prime-slider-lite.php" instead of "bdthemes-prime-slider.php")

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin78,954 lines of code in 379 files:
LanguageFilesBlank linesComment linesLines of code
PHP21214,48919,60269,398
SVG44135297,275
JavaScript503092422,208
CSS720072
HTML1001

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity50.46
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces55
Interfaces1
Traits2
Classes118
▷ Abstract classes32.54%
▷ Concrete classes11597.46%
▷ Final classes10.87%
Methods2,029
▷ Static methods23311.48%
▷ Public methods1,52675.21%
▷ Protected methods1105.42%
▷ Private methods39319.37%
Functions149
▷ Named functions13993.29%
▷ Anonymous functions106.71%
Constants171
▷ Global constants12070.18%
▷ Class constants5129.82%
▷ Public constants51100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.18MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/gallery/item-8.png6.37KB5.84KB▼ 8.43%
assets/images/gems-3.png27.39KB14.47KB▼ 47.17%
freemius/assets/img/bdthemes-prime-slider.png4.65KB3.17KB▼ 31.84%
assets/images/gallery/item-1.png6.37KB5.71KB▼ 10.33%
assets/images/gallery/item-7.png6.34KB5.69KB▼ 10.23%