74% nv-slider

Code Review | NV Slider

WordPress plugin NV Slider scored74%from 54 tests.

About plugin

  • Plugin page: nv-slider
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.8
  • WordPress version: 6.3.1
  • First release: Jul 17, 2012
  • Latest release: Apr 1, 2016
  • Number of updates: 32
  • Update frequency: every 55.6 days
  • Top authors: ryansutana (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /7,478 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.69ms] Passed 4 tests

Server-side resources used by NV Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0945.08 ▲0.95
Dashboard /wp-admin3.39 ▲0.0952.02 ▼1.58
Posts /wp-admin/edit.php3.50 ▲0.1550.63 ▼1.49
Add New Post /wp-admin/post-new.php5.97 ▲0.09102.28 ▼0.65
Media Library /wp-admin/upload.php3.31 ▲0.0839.63 ▲2.77
Sliders /wp-admin/edit.php?post_type=nv-slider3.3538.53
Add New /wp-admin/post-new.php?post_type=nv-slider3.4457.08
Settings /wp-admin/edit.php?post_type=nv-slider&page=nv-slider/nv-slider.php3.3033.20

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 19 new files
Database: 1 new table, 6 new options
New tables
wp_nv_slider
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

NV Slider: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14513.46 ▼0.898.36 ▲6.6843.82 ▼0.20
Dashboard /wp-admin2,229 ▲525.56 ▼0.0488.46 ▼9.6743.26 ▼2.12
Posts /wp-admin/edit.php2,131 ▲282.02 ▲0.0235.56 ▼4.4837.25 ▲2.88
Add New Post /wp-admin/post-new.php1,552 ▲2623.60 ▲0.53659.61 ▼11.2059.11 ▼2.57
Media Library /wp-admin/upload.php1,431 ▲314.17 ▼0.02103.88 ▼2.9745.08 ▲0.64
Sliders /wp-admin/edit.php?post_type=nv-slider1,1121.9830.5931.45
Add New /wp-admin/post-new.php?post_type=nv-slider2,2847.59170.0166.08
Settings /wp-admin/edit.php?post_type=nv-slider&page=nv-slider/nv-slider.php1,1441.9825.2539.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_nv_slider
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nv-slider/admin/post_meta.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nv-slider/admin/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/nv-slider/nv-slider.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nv-slider/inc/shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/nv-slider/inc/utilities.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (screenshot-1.png displays the running NV Slider), #2 (screenshot-2.png displaying lists of slider in dasbboard area with thumbnail indicator), #3 (screenshot-3.png plugin settings and instruction)
The official readme.txt might help

nv-slider/nv-slider.php Passed 13 tests

"NV Slider" version 1.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
129 characters long description:
A responsive, simple, light and easy customizable wordpress content slider and comes with unlimeted number of slides and effects.

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
No dangerous file extensions were detected1,268 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript17565522
PHP710050512
CSS22622154
Markdown123080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity2.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.57MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/bullets.png38.32KB0.22KB▼ 99.42%
screenshot-3.png45.22KB19.52KB▼ 56.82%
screenshot-2.png54.06KB16.21KB▼ 70.03%
assets/images/arrows.png51.21KB0.74KB▼ 98.56%
screenshot-1.png389.96KB107.12KB▼ 72.53%