84% cpt-bootstrap-carousel

Code Review | CPT Bootstrap Carousel

WordPress plugin CPT Bootstrap Carousel scored84%from 54 tests.

About plugin

  • Plugin page: cpt-bootstrap-car...
  • Plugin version: 1.12
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2013
  • Latest release: Nov 11, 2020
  • Number of updates: 28
  • Update frequency: every 127.1 days
  • Top authors: tallphil (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

7,000+ active /187,499 total downloads

Benchmarks

Plugin footprint 83% 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.24MB] [CPU: ▼6.53ms] Passed 4 tests

An overview of server-side resources used by CPT Bootstrap Carousel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.2646.50 ▼0.16
Dashboard /wp-admin3.87 ▲0.2454.83 ▼19.35
Posts /wp-admin/edit.php3.92 ▲0.2456.15 ▲6.13
Add New Post /wp-admin/post-new.php6.39 ▲0.2497.05 ▼1.81
Media Library /wp-admin/upload.php3.73 ▲0.2439.60 ▼4.80
Carousel /wp-admin/edit.php?post_type=cptbc3.7743.41
Add New /wp-admin/post-new.php?post_type=cptbc3.8857.84
Settings /wp-admin/edit.php?post_type=cptbc&page=cpt-bootstrap-carousel3.7138.81
Carousel Categories /wp-admin/edit-tags.php?taxonomy=carousel_category&post_type=cptbc3.7333.57

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

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

Browser metrics Passed 4 tests

CPT Bootstrap Carousel: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲4114.38 ▼0.042.25 ▲0.3044.55 ▼0.93
Dashboard /wp-admin2,230 ▲595.60 ▼0.1085.35 ▼17.9241.13 ▼3.75
Posts /wp-admin/edit.php2,135 ▲322.05 ▲0.0140.89 ▲5.3037.51 ▲3.54
Add New Post /wp-admin/post-new.php1,574 ▲4323.33 ▲0.08649.68 ▲10.1449.39 ▲0.19
Media Library /wp-admin/upload.php1,438 ▲384.22 ▲0.02100.12 ▼15.8741.87 ▼5.94
Carousel /wp-admin/edit.php?post_type=cptbc1,1211.9531.7232.38
Add New /wp-admin/post-new.php?post_type=cptbc2,0893.7564.7841.87
Settings /wp-admin/edit.php?post_type=cptbc&page=cpt-bootstrap-carousel1,3292.0322.6131.46
Carousel Categories /wp-admin/edit-tags.php?taxonomy=carousel_category&post_type=cptbc1,3092.1432.8530.74

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • cptbc_settings
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpt-bootstrap-carousel/src/cptbc-init.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpt-bootstrap-carousel/cpt-bootstrap-carousel.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cpt-bootstrap-carousel/src/cptbc-admin.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/cpt-bootstrap-carousel/src/cptbc-settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cpt-bootstrap-carousel/src/cptbc-frontend.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: carousel, image, bootstrap, slider

cpt-bootstrap-carousel/cpt-bootstrap-carousel.php 92% from 13 tests

This is the main PHP file of "CPT Bootstrap Carousel" version 1.12, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 239 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,683 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP5781011,077
PO File6229246606

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity81.00
▷ Minimum class complexity81.00
▷ Maximum class complexity81.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin