77% nitek-carousel-cool-transitions

Code Review | Nitek Carousel Slider Cool Transitions

WordPress plugin Nitek Carousel Slider Cool Transitions scored 77% from 54 tests.

About plugin

  • Plugin page: nitek-carousel-co...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.6
  • WordPress version: 5.9.2
  • First release: Jul 6, 2018
  • Latest release: Jul 9, 2018
  • Number of updates: 44
  • Update frequency: every 0.1 days
  • Top authors: djenh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 447 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 gracefully, with no errors

Server metrics [RAM: ▲3.56MB] [CPU: ▼288.25ms] Passed 4 tests

An overview of server-side resources used by Nitek Carousel Slider Cool Transitions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /7.33 ▲3.8176.84 ▲23.55
Dashboard /wp-admin7.35 ▲3.9456.56 ▲10.98
Posts /wp-admin/edit.php7.35 ▲3.7159.24 ▲14.10
Add New Post /wp-admin/post-new.php9.76 ▲2.78122.20 ▼1,193.80
Media Library /wp-admin/upload.php7.35 ▲4.0543.85 ▲15.74
Add New /wp-admin/post-new.php?post_type=nitek-carousel-cpt7.3567.95
All Items /wp-admin/edit.php?post_type=nitek-carousel-cpt7.3550.41
Nitek Carousel Settings /wp-admin/plugins.php?page=nitek-menu-carousel7.4543.01
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=nitek-carousel-cpt7.3549.48
Freemius Debug [v.2.1.1.2] /wp-admin/admin.php?page=freemius7.3545.38

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 233 new files
Database: no new tables, 6 new options
New WordPress options
fs_accounts
category_children
fs_debug_mode
fs_api_cache
fs_gdpr
fs_active_plugins

Browser metrics Passed 4 tests

An overview of browser requirements for Nitek Carousel Slider Cool Transitions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,955 ▲20816.44 ▲0.849.62 ▲3.642.05 ▼0.49
Dashboard /wp-admin2,967 ▲1136.18 ▲0.01126.06 ▼8.77168.64 ▲11.33
Posts /wp-admin/edit.php2,766 ▲723.25 ▼0.1262.22 ▼6.11156.49 ▲6.51
Add New Post /wp-admin/post-new.php1,704 ▼4819.10 ▼1.71386.31 ▼63.91173.79 ▲22.66
Media Library /wp-admin/upload.php1,776 ▲815.57 ▲0.06138.87 ▼0.78198.08 ▲12.49
Add New /wp-admin/post-new.php?post_type=nitek-carousel-cpt2,5055.6197.30151.80
All Items /wp-admin/edit.php?post_type=nitek-carousel-cpt1,4903.1557.09135.37
Nitek Carousel Settings /wp-admin/plugins.php?page=nitek-menu-carousel1,5142.7453.77148.23
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=nitek-carousel-cpt1,9532.7957.59150.62
Freemius Debug [v.2.1.1.2] /wp-admin/admin.php?page=freemius1,4882.5054.27124.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • fs_active_plugins
    • fs_api_cache
    • fs_gdpr
    • category_children
    • fs_accounts
    • fs_debug_mode

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/nitek-carousel-cool-transitions/admin/partials/nitek-carousel-admin-display-mb.php
    • > /wp-content/plugins/nitek-carousel-cool-transitions/admin/partials/nitek-carousel-admin-display-general-sect.php
    • > /wp-content/plugins/nitek-carousel-cool-transitions/freemius/templates/ajax-loader.php
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nitek-carousel-cool-transitions/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/nitek-carousel-cool-transitions/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nitek-carousel-cool-transitions/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/nitek-carousel-cool-transitions/public/partials/nitek-carousel-public-display.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/nitek-carousel-cool-transitions/admin/partials/nitek-carousel-admin-display-free_premium-sect.php:98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/nitek-carousel-cool-transitions/admin/partials/nitek-carousel-admin-display-general-sect.php:120
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nitek-carousel-cool-transitions/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/nitek-carousel-cool-transitions/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/nitek-carousel-cool-transitions/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/nitek-carousel-cool-transitions/freemius/templates/account/partials/addon.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === nitek-carousel-cool-transitions === )
  • Donate link: Invalid url: ""
You can look at the official readme.txt

nitek-carousel-cool-transitions/nitek-carousel.php 77% from 13 tests

"Nitek Carousel Slider Cool Transitions" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("nitek-carousel-cool-transitions.php" instead of "nitek-carousel.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 232 characters long)

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
Good job! No executable or dangerous file extensions detected38,893 lines of code in 182 files:
LanguageFilesBlank linesComment linesLines of code
PHP1186,71014,80926,641
PO File94,2164,9449,156
Sass25390772,443
Markdown2680214
JavaScript639113202
SVG626118
CSS14222082
JSON20037

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,244)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity62.67
▷ Minimum class complexity1.00
▷ Maximum class complexity2,244.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods1,082
▷ Static methods16014.79%
▷ Public methods77471.53%
▷ Protected methods151.39%
▷ Private methods29327.08%
Functions96
▷ Named functions96100.00%
▷ Anonymous functions00.00%
Constants117
▷ Global constants9782.91%
▷ Class constants2017.09%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/css/img/bullet2.PNG0.40KB0.25KB▼ 37.44%
public/css/img/arrow1.PNG0.68KB0.50KB▼ 25.76%
admin/css/img/premium-img.png32.25KB18.76KB▼ 41.83%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
public/css/img/arrow2.PNG0.97KB0.56KB▼ 41.97%