82% orange-bootstrap-carousel

Code Review | Orange Bootstrap Carousel

WordPress plugin Orange Bootstrap Carousel scored 82% from 53 tests.

About plugin

  • Plugin page: orange-bootstrap-...
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 5.8.1
  • First release: Oct 29, 2015
  • Latest release: Oct 29, 2015
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: Nabajit Roy (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 624 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.17MB] [CPU: ▼286.89ms] Passed 4 tests

An overview of server-side resources used by Orange Bootstrap Carousel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.97 ▲0.2534.14 ▲4.88
Dashboard /wp-admin3.28 ▲0.2345.06 ▲7.67
Posts /wp-admin/edit.php3.33 ▲0.2236.71 ▼11.89
Add New Post /wp-admin/post-new.php4.17 ▼1.2645.99 ▼1,136.12
Media Library /wp-admin/upload.php3.14 ▲0.1333.66 ▼4.41
Add New /wp-admin/post-new.php?post_type=orange-slider3.0735.35
Settings /wp-admin/edit.php?post_type=orange-slider&page=orange-carousel-slider-settings3.1432.36
Orange Slider /wp-admin/edit.php?post_type=orange-slider3.2135.04

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 1 new option
New WordPress options
orange_slider_settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for Orange Bootstrap Carousel
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,034 ▲42818.30 ▲2.7212.99 ▲4.7773.11 ▲28.00
Dashboard /wp-admin3,209 ▲3598.37 ▲2.36174.00 ▲40.49105.15 ▼2.06
Posts /wp-admin/edit.php3,008 ▲3024.57 ▲1.8984.03 ▲13.1890.31 ▼4.70
Add New Post /wp-admin/post-new.php2,085 ▲49719.39 ▼2.25350.53 ▲75.36130.80 ▲20.61
Media Library /wp-admin/upload.php1,855 ▲834.96 ▼0.02118.44 ▼38.80106.80 ▼13.37
Add New /wp-admin/post-new.php?post_type=orange-slider2,4644.77105.5675.63
Settings /wp-admin/edit.php?post_type=orange-slider&page=orange-carousel-slider-settings3,4684.0885.7482.45
Orange Slider /wp-admin/edit.php?post_type=orange-slider1,6784.3481.4365.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=orange-slider
    • > Notice in wp-content/plugins/orange-bootstrap-carousel/carousel_functions.php+251
    Undefined index: podcastmeta_noncename

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
Almost there! Just fix the following items
  • 1× 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/orange-bootstrap-carousel/orange-bootstrap-carousel_settings.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=orange-slider
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/orange-bootstrap-carousel/js/scripts.js?ver=5.8.1:5:36)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.8.1:2:30340)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=orange-slider
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.8.1 1:31702 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 90% 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 require attention:
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.2), #2 (screenshot-3.2)
You can look at the official readme.txt

orange-bootstrap-carousel/orange-bootstrap-carousel.php 85% from 13 tests

The main file in "Orange Bootstrap Carousel" v. 0.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 239 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected5,598 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS5420262,556
JavaScript36102021,619
SVG200928
PHP313552495

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.83
Average class complexity38.00
▷ Minimum class complexity9.00
▷ Maximum class complexity85.00
Average method complexity6.55
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.33MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png57.10KB27.85KB▼ 51.22%
screenshot-1.png259.97KB71.15KB▼ 72.63%
screenshot-2.png21.23KB11.18KB▼ 47.35%