10% c4d-logo-carousel

Code Review | C4D WP Logo Carousel

WordPress plugin C4D WP Logo Carousel scored10%from 54 tests.

About plugin

  • Plugin page: c4d-logo-carousel
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2017
  • Latest release: Mar 14, 2017
  • Number of updates: 12
  • Update frequency: every 1.8 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /657 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/c4d-logo-carousel/c4d-wp-logo-carousel.php+51
    Use of undefined constant C4DTESTIMONIAL - assumed 'C4DTESTIMONIAL' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.91MB] [CPU: ▼49.17ms] Passed 4 tests

Server-side resources used by C4D WP Logo Carousel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.60 ▼33.91
Dashboard /wp-admin2.10 ▼1.2011.40 ▼44.33
Posts /wp-admin/edit.php2.10 ▼1.257.05 ▼42.79
Add New Post /wp-admin/post-new.php2.10 ▼3.786.64 ▼75.64
Media Library /wp-admin/upload.php2.10 ▼1.136.59 ▼26.13
C4D Logo /wp-admin/edit.php?post_type=c4d-wplc2.106.21
Add New /wp-admin/post-new.php?post_type=c4d-wplc2.107.33

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

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

Browser metrics Passed 4 tests

C4D WP Logo Carousel: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲22613.79 ▼0.727.43 ▲5.6939.48 ▼3.88
Dashboard /wp-admin2,233 ▲455.83 ▼0.03100.16 ▼0.5637.96 ▼2.00
Posts /wp-admin/edit.php2,116 ▲272.04 ▼0.0034.31 ▼2.4334.53 ▼2.14
Add New Post /wp-admin/post-new.php1,569 ▲5023.27 ▼0.10682.36 ▼9.9952.95 ▼5.26
Media Library /wp-admin/upload.php1,418 ▲304.20 ▼0.0396.73 ▼1.4640.98 ▼1.63
C4D Logo /wp-admin/edit.php?post_type=c4d-wplc1,0891.9330.3235.66
Add New /wp-admin/post-new.php?post_type=c4d-wplc2,1767.70169.4362.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/c4d-logo-carousel/c4d-wp-logo-carousel.php+51
    Use of undefined constant C4DTESTIMONIAL - assumed 'C4DTESTIMONIAL' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=c4d-wplc
    • > Warning in wp-content/plugins/c4d-logo-carousel/c4d-wp-logo-carousel.php+51
    Use of undefined constant C4DTESTIMONIAL - assumed 'C4DTESTIMONIAL' (this will throw an Error in a future version of PHP)

SRP 50% 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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/c4d-logo-carousel/templates/default.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/c4d-logo-carousel/c4d-wp-logo-carousel.php:12
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/c4d-logo-carousel/templates/default.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 21 tag instead of maximum 10
You can look at the official readme.txt

c4d-logo-carousel/c4d-wp-logo-carousel.php 85% from 13 tests

"C4D WP Logo Carousel" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("c4d-logo-carousel.php" instead of "c4d-wp-logo-carousel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,974 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4212221,325
CSS41828268
PHP21816185
Sass151159
JSON10023
SVG10014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
libs/owl-carousel/grabbing.png0.11KB0.14KB0.00%