83% great-caroussel

Code Review | Great Caroussel

WordPress plugin Great Caroussel scored83%from 54 tests.

About plugin

  • Plugin page: great-caroussel
  • Plugin version: 1.06
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Jul 11, 2017
  • Latest release: Jul 31, 2023
  • Number of updates: 26
  • Update frequency: every 85.0 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /8,943 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.33ms] Passed 4 tests

Analyzing server-side resources used by Great Caroussel
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.12 ▼1.10
Dashboard /wp-admin3.35 ▲0.0549.63 ▼3.18
Posts /wp-admin/edit.php3.40 ▲0.0550.26 ▼3.56
Add New Post /wp-admin/post-new.php5.93 ▲0.0598.77 ▼1.49
Media Library /wp-admin/upload.php3.27 ▲0.0539.28 ▲2.59

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Great Caroussel
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.35 ▼0.001.63 ▼0.1942.52 ▲0.31
Dashboard /wp-admin2,196 ▲165.55 ▼0.1086.58 ▼14.7773.24 ▲29.61
Posts /wp-admin/edit.php2,113 ▲131.99 ▼0.0439.10 ▲0.5234.75 ▼5.15
Add New Post /wp-admin/post-new.php1,691 ▲16521.87 ▼1.22735.12 ▲47.4456.77 ▲2.32
Media Library /wp-admin/upload.php1,413 ▲164.19 ▲0.02102.55 ▼11.8875.10 ▲17.73

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/great-caroussel/views/caroussels.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/great-caroussel/great-caroussel.php:19
    • > PHP Warning
      sizeof(): Parameter must be an array or an object that implements Countable in wp-content/plugins/great-caroussel/views/tpl.php on line 2
    • > PHP Notice
      Undefined variable: caroussel in wp-content/plugins/great-caroussel/views/tpl.php on line 1
    • > PHP Notice
      Undefined variable: contents in wp-content/plugins/great-caroussel/views/tpl.php on line 6
    • > PHP Notice
      Undefined variable: contents in wp-content/plugins/great-caroussel/views/tpl.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/great-caroussel/views/caroussel.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/great-caroussel/views/tpl.php:14
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/great-caroussel/views/tpl.php on line 1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/great-caroussel/views/tpl.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

great-caroussel/great-caroussel.php 77% from 13 tests

The entry point to "Great Caroussel" version 1.06 is a PHP file that has certain tags in its header comment area
Please take the time 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
  • Domain Path: Prefix the domain path with a forward slash character ("/")
  • Domain Path: The domain path should use only dashes and lowercase characters ("")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin475 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP419836341
CSS212084
JavaScript19150

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions11
▷ Named functions11100.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
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/save.png0.54KB0.39KB▼ 28.11%
images/icon.png0.58KB0.41KB▼ 28.38%
images/contents.png1.00KB0.87KB▼ 12.61%
images/forward.png4.39KB2.59KB▼ 41.04%
images/back.png4.31KB2.56KB▼ 40.50%