84% night-carousel-plus

Code Review | Night Carousel Plus

WordPress plugin Night Carousel Plus scored84%from 54 tests.

About plugin

  • Plugin page: night-carousel-plus
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 14, 2016
  • Latest release: Jul 14, 2016
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: filmmaker3000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /533 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.07MB] [CPU: ▼2.17ms] Passed 4 tests

An overview of server-side resources used by Night Carousel Plus
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.92 ▼4.11
Dashboard /wp-admin3.39 ▲0.0453.21 ▼11.08
Posts /wp-admin/edit.php3.44 ▲0.0852.19 ▲4.59
Add New Post /wp-admin/post-new.php5.97 ▲0.08108.43 ▲8.24
Media Library /wp-admin/upload.php3.31 ▲0.0839.36 ▲1.94
Add New Owl Slide /wp-admin/post-new.php?post_type=ncp-slides3.4454.05
All Owl Slides /wp-admin/edit.php?post_type=ncp-slides3.3537.99
Owl Slide Carousel /wp-admin/edit-tags.php?taxonomy=ncp-carousel&post_type=ncp-slides3.3027.36

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Night Carousel Plus: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.38 ▲0.033.64 ▲1.7038.78 ▼6.14
Dashboard /wp-admin2,229 ▲555.63 ▲0.0796.06 ▼4.2741.40 ▼2.64
Posts /wp-admin/edit.php2,131 ▲311.97 ▲0.0340.24 ▲0.0241.07 ▲5.39
Add New Post /wp-admin/post-new.php1,561 ▲3518.17 ▼5.37607.21 ▼78.2074.37 ▲15.05
Media Library /wp-admin/upload.php1,434 ▲344.18 ▼0.01100.01 ▼10.1343.16 ▼4.81
Add New Owl Slide /wp-admin/post-new.php?post_type=ncp-slides2,3397.73176.9866.09
All Owl Slides /wp-admin/edit.php?post_type=ncp-slides1,1031.9729.9431.36
Owl Slide Carousel /wp-admin/edit-tags.php?taxonomy=ncp-carousel&post_type=ncp-slides1,3052.1226.1427.01

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/night-carousel-plus/src/ncp-cpt-owl-slides.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/night-carousel-plus/src/ncp-carousel-options.php:80
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/night-carousel-plus/src/ncp-enqueue.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/night-carousel-plus/src/ncp-enqueue.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/night-carousel-plus/src/ncp-shortcodes.php:6

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Requires at least: The plugin version is formatted incorrectly
You can look at the official readme.txt

night-carousel-plus/night-carousel-plus.php Passed 13 tests

The primary PHP file in "Night Carousel Plus" version 1.1.4 is used by WordPress to initiate all plugin functionality
47 characters long description:
Easy Manager for the Owl Carousel Jquery Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin534 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP63158257
CSS31031231
Markdown119044
JavaScript1052

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/owl.video.play.png4.86KB2.74KB▼ 43.61%
assets/img/ocpscreen.png92.39KB24.25KB▼ 73.75%