72% brand-carousel

Code Review | Brand Carousel

WordPress plugin Brand Carousel scored72%from 54 tests.

About plugin

  • Plugin page: brand-carousel
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2023
  • Latest release: Feb 25, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ferdausalom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲1.45MB] [CPU: ▲7.69ms] Passed 4 tests

A check of server-side resources used by Brand Carousel
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.96 ▲1.4956.03 ▲19.56
Dashboard /wp-admin4.76 ▲1.4555.96 ▲7.60
Posts /wp-admin/edit.php4.81 ▲1.4562.92 ▲19.91
Add New Post /wp-admin/post-new.php7.36 ▲1.4787.37 ▼6.83
Media Library /wp-admin/upload.php4.66 ▲1.4344.49 ▲10.41
Brands Carousel /wp-admin/edit.php?post_type=rbcs_carousels4.7349.36
Add New Brand /wp-admin/post-new.php?post_type=rbcs_carousels4.7155.09

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 582 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Brand Carousel
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,189 ▲44318.87 ▲4.306.15 ▲4.7141.26 ▼0.14
Dashboard /wp-admin2,502 ▲3218.95 ▲3.24162.95 ▲64.6041.32 ▼1.02
Posts /wp-admin/edit.php2,433 ▲3336.20 ▲4.1785.66 ▲47.3934.41 ▲0.35
Add New Post /wp-admin/post-new.php1,623 ▲9519.83 ▼3.40712.70 ▲52.4736.74 ▼21.26
Media Library /wp-admin/upload.php1,570 ▲1736.70 ▲2.51104.05 ▲6.2448.99 ▲3.96
Brands Carousel /wp-admin/edit.php?post_type=rbcs_carousels1,4376.0768.1326.09
Carousel Settings /wp-admin/crb_carbon_fields_container_carousel_settings.php260.420.0913.12
Add New Brand /wp-admin/post-new.php?post_type=rbcs_carousels1,8076.0987.8731.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/brand-carousel/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 225× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Time_Field' not found in wp-content/plugins/brand-carousel/vendor/htmlburger/carbon-fields/core/Field/Date_Time_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/brand-carousel/vendor/htmlburger/carbon-fields/core/Container/Nav_Menu_Item_Container.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/brand-carousel/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/brand-carousel/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/brand-carousel/vendor/htmlburger/carbon-fields/core/Field/Association_Field.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Meta_Datastore' not found in wp-content/plugins/brand-carousel/vendor/htmlburger/carbon-fields/core/Datastore/Post_Meta_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/brand-carousel/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Parent_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/brand-carousel/views/brand-carousel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/brand-carousel/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/brand-carousel/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/crb_carbon_fields_container_carousel_settings.php
    • > Network (severe)
    wp-admin/crb_carbon_fields_container_carousel_settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: slide, image carousel, brand, carousel, image

brand-carousel/brand-carousel.php 85% from 13 tests

The principal PHP file in "Brand Carousel" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 195 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 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
There were no executable files found in this plugin27,216 lines of code in 525 files:
LanguageFilesBlank linesComment linesLines of code
PHP2592,9707,27111,337
JavaScript1702,5224,7968,920
PO File268191,0202,202
CSS103721,1542,072
Sass4833901,769
JSON500712
YAML3313123
Markdown324068
SVG11013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.53
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces25
Interfaces5
Traits0
Classes230
▷ Abstract classes125.22%
▷ Concrete classes21894.78%
▷ Final classes10.46%
Methods1,028
▷ Static methods10510.21%
▷ Public methods81579.28%
▷ Protected methods20119.55%
▷ Private methods121.17%
Functions111
▷ Named functions2320.72%
▷ Anonymous functions8879.28%
Constants35
▷ Global constants822.86%
▷ Class constants2777.14%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin