68% client-carousel

Code Review | Client Carousel

WordPress plugin Client Carousel scored68%from 54 tests.

About plugin

  • Plugin page: client-carousel
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 18, 2016
  • Latest release: May 3, 2016
  • Number of updates: 24
  • Update frequency: every 2.0 days
  • Top authors: creativepig (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /6,777 total downloads

Benchmarks

Plugin footprint 65% from 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.82MB] [CPU: ▼34.44ms] Passed 4 tests

Server-side resources used by Client Carousel
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1636.67 ▼7.01
Dashboard /wp-admin3.14 ▼0.2125.46 ▼37.58
Posts /wp-admin/edit.php3.14 ▼0.2225.03 ▼21.18
Add New Post /wp-admin/post-new.php3.14 ▼2.7525.79 ▼69.18
Media Library /wp-admin/upload.php3.14 ▼0.0926.33 ▼9.82
All Client Carousel /wp-admin/edit.php?post_type=cpcarousel3.1424.17
Add Client Carousel /wp-admin/post-new.php?post_type=cpcarousel3.1425.26
Settings /wp-admin/edit.php?post_type=cpcarousel&page=logo-client-carousel3.1430.47

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
clogo_settings
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Client Carousel: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲17013.47 ▼1.1010.62 ▲8.9035.73 ▼6.89
Dashboard /wp-admin2,234 ▲545.63 ▲0.0486.73 ▼8.8141.45 ▼1.35
Posts /wp-admin/edit.php2,136 ▲361.98 ▼0.0535.94 ▲0.0436.36 ▼0.68
Add New Post /wp-admin/post-new.php1,557 ▲3123.19 ▼0.22667.33 ▼2.6053.98 ▼0.33
Media Library /wp-admin/upload.php1,436 ▲334.25 ▲0.0694.36 ▼7.8343.55 ▼3.86
All Client Carousel /wp-admin/edit.php?post_type=cpcarousel1,1171.9728.9631.23
Add Client Carousel /wp-admin/post-new.php?post_type=cpcarousel1,6483.5761.2031.96
Settings /wp-admin/edit.php?post_type=cpcarousel&page=logo-client-carousel1,1212.0022.6826.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • clogo_settings

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cpcarousel&page=logo-client-carousel
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=cpcarousel
    • > Notice in wp-content/plugins/client-carousel/admin/cpadmin.php+36
    Undefined property: Admin::$version
    • > GET request to /wp-admin/edit.php?post_type=cpcarousel&page=logo-client-carousel
    • > Notice in wp-content/plugins/client-carousel/admin/cpadmin_settings.php+111
    Undefined index: box_shadow
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cpcarousel&page=logo-client-carousel
    • > Notice in wp-content/plugins/client-carousel/admin/cpadmin_settings.php+119
    Undefined index: carousel_style
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cpcarousel&page=logo-client-carousel
    • > Notice in wp-content/plugins/client-carousel/admin/cpadmin_settings.php+132
    Undefined index: hover_style
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cpcarousel&page=logo-client-carousel
    • > Notice in wp-content/plugins/client-carousel/admin/cpadmin_settings.php+144
    Undefined index: button_style

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/client-carousel/cpcarousel.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/client-carousel/admin/cpadmin_settings.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: The official readme.txt might help

client-carousel/cpcarousel.php 92% from 13 tests

This is the main PHP file of "Client Carousel" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("client-carousel.php" instead of "cpcarousel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin9,572 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS768466,095
SVG2001,890
JavaScript43720829
PHP728654758

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.40
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods2882.35%
▷ Protected methods00.00%
▷ Private methods617.65%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.24MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
classes/assets/images/carouselwith-seprator.png44.44KB16.67KB▼ 62.48%
classes/assets/images/next-prev-btn.png41.06KB14.67KB▼ 64.28%
classes/assets/images/pagination.png41.58KB14.98KB▼ 63.97%
classes/assets/images/Creativepig-logo.png3.54KB1.56KB▼ 55.85%
classes/assets/images/hover-gray.png31.33KB16.55KB▼ 47.16%