68% e-carousel

Code Review | E-carousel

WordPress plugin E-carousel scored68%from 54 tests.

About plugin

  • Plugin page: e-carousel
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2015
  • Latest release: Feb 12, 2015
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: webegenius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,405 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.94MB] [CPU: ▼61.23ms] Passed 4 tests

Analyzing server-side resources used by E-carousel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.415.11 ▼35.69
Dashboard /wp-admin2.08 ▼1.275.77 ▼66.82
Posts /wp-admin/edit.php2.08 ▼1.286.66 ▼44.32
Add New Post /wp-admin/post-new.php2.08 ▼3.816.36 ▼98.10
Media Library /wp-admin/upload.php2.08 ▼1.156.23 ▼31.16
All carousel list /wp-admin/edit.php?post_type=e-carousel2.087.65
Add New /wp-admin/post-new.php?post_type=e-carousel2.085.11

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for E-carousel
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲17313.50 ▼0.6610.56 ▲8.9360.68 ▲17.20
Dashboard /wp-admin2,227 ▲535.69 ▲0.1188.82 ▼2.7839.23 ▼6.39
Posts /wp-admin/edit.php2,138 ▲382.19 ▲0.2537.83 ▼3.4634.65 ▼4.31
Add New Post /wp-admin/post-new.php1,558 ▲3223.06 ▼0.55619.45 ▼21.3062.70 ▲12.99
Media Library /wp-admin/upload.php1,438 ▲384.25 ▼0.00101.38 ▼3.1242.18 ▼3.94
All carousel list /wp-admin/edit.php?post_type=e-carousel1,1052.1534.3830.98
Add New /wp-admin/post-new.php?post_type=e-carousel2,3077.75169.6665.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the e-carousel-js-id handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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=e-carousel
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the e-carousel-js-id handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=e-carousel
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the e-main-car handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=e-carousel
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the e-font-awesome-id handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=e-carousel
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the e-carousel-css-id handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Almost there! Just 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/e-carousel/e_carousel.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/e-carousel/includes/efunctions.php:29

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #2 is required in e-carousel/assets to your readme.txt
The official readme.txt might help

e-carousel/e_carousel.php 92% from 13 tests

This is the main PHP file of "E-carousel" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("e-carousel.php" instead of "e_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
There were no executable files found in this plugin881 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
SVG200733
PHP2541979
JavaScript4293967
CSS2032

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/js/e.png0.66KB0.74KB0.00%