62% cozy-addons

Code Review | Cozy Addons for Elementor - Header and Footer builder for Elementor, Layout and Widgets for WooCommerce, Magazine, slider, blog and more.

WordPress plugin Cozy Addons for Elementor - Header and Footer builder for Elementor, Layout and Widgets for WooCommerce, Magazine, slider, blog and more. scored62%from 54 tests.

About plugin

  • Plugin page: cozy-addons
  • Plugin version: 1.2.10
  • PHP compatiblity: 7.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Mar 8, 2022
  • Latest release: Oct 17, 2023
  • Number of updates: 24
  • Update frequency: every 24.5 days
  • Top authors: cozythemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /7,044 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.04MB] [CPU: ▲25.71ms] 75% from 4 tests

A check of server-side resources used by Cozy Addons for Elementor - Header and Footer builder for Elementor, Layout and Widgets for WooCommerce, Magazine, slider, blog and more.
Please fix the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.04MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.90 ▲5.4361.68 ▲23.50
Dashboard /wp-admin8.92 ▲5.6170.71 ▲23.38
Posts /wp-admin/edit.php8.92 ▲5.5671.83 ▲25.43
Add New Post /wp-admin/post-new.php9.45 ▲3.56116.82 ▲30.51
Media Library /wp-admin/upload.php8.92 ▲5.6977.20 ▲42.20
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius8.9263.07

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 319 new files
Database: no new tables, 9 new options
New WordPress options
fs_debug_mode
fs_accounts
db_upgraded
fs_active_plugins
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cozy Addons for Elementor - Header and Footer builder for Elementor, Layout and Widgets for WooCommerce, Magazine, slider, blog and more.
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲12514.36 ▼0.211.63 ▼0.1227.31 ▼19.62
Dashboard /wp-admin2,289 ▲1125.58 ▼0.0983.89 ▼15.9094.07 ▲52.08
Posts /wp-admin/edit.php2,198 ▲982.15 ▲0.1837.98 ▲1.4839.39 ▲3.38
Add New Post /wp-admin/post-new.php1,761 ▲23321.09 ▼2.09750.51 ▲103.7456.79 ▲10.17
Media Library /wp-admin/upload.php1,497 ▲974.20 ▼0.01108.60 ▲6.6981.98 ▲37.07
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,1001.6624.1927.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/cozy-addons/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • fs_accounts
    • widget_theysaidso_widget
    • fs_debug_mode
    • db_upgraded
    • widget_recent-comments
    • fs_active_plugins

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 0% 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
  • 8× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cozy-addons/public/widgets/flip-box/flip-box.php
    • > /wp-content/plugins/cozy-addons/public/widgets/authorbox/author-box.php
    • > /wp-content/plugins/cozy-addons/admin/partials/cozy-addons-admin-display.php
    • > /wp-content/plugins/cozy-addons/public/partials/cozy-addons-public-display.php
    • > /wp-content/plugins/cozy-addons/public/widgets/working-hour/working-hour.php
    • > /wp-content/plugins/cozy-addons/public/widgets/buttons-group/multi-buttons.php
    • > /wp-content/plugins/cozy-addons/public/widgets/site-logo/site-logo.php
    • > /wp-content/plugins/cozy-addons/public/widgets/price-list/price-list.php
  • 158× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant COZY_ADDONS_PLUGIN_DIR - assumed 'COZY_ADDONS_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-addons/public/widgets/posts/focus-post-layout.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'COZY_ADDONS_PLUGIN_DIRpublic/partials/partial-functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/cozy-addons/public/widgets/popular-post/popular-post-layout.php on line 2
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/cozy-addons/public/widgets/pricing-tables/pricing-table.php on line 59
    • > PHP Warning
      Use of undefined constant COZY_ADDONS_PLUGIN_DIR - assumed 'COZY_ADDONS_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-addons/public/widgets/posts/advanced-magblock-layout.php on line 2
    • > PHP Warning
      Use of undefined constant COZY_ADDONS_PLUGIN_DIR - assumed 'COZY_ADDONS_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-addons/public/widgets/portfolio/portfolio-layout.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cozy-addons/public/widgets/pricing-tables/pricing-table.php on line 40
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cozy-addons/public/widgets/pricing-tables/pricing-table.php on line 66
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cozy-addons/public/widgets/hover-box/hover-box.php on line 3
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/cozy-addons/public/widgets/flip-box/flip-box.php on line 7
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/cozy-addons/public/widgets/travel-list/travel-list.php on line 2

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 36 tag instead of maximum 10
You can look at the official readme.txt

cozy-addons/cozy-addons.php 92% from 13 tests

The principal PHP file in "Cozy Addons for Elementor - Header and Footer builder for Elementor, Layout and Widgets for WooCommerce, Magazine, slider, blog and more." v. 1.2.10 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 143 characters long)

Code Analysis 97% from 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 plugin115,830 lines of code in 260 files:
LanguageFilesBlank linesComment linesLines of code
PHP21812,18320,119100,165
JavaScript111,83035410,808
CSS18922404,538
Markdown1680214
SVG110089
XML13016

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity45.11
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces46
Interfaces0
Traits0
Classes107
▷ Abstract classes21.87%
▷ Concrete classes10598.13%
▷ Final classes10.95%
Methods1,990
▷ Static methods20110.10%
▷ Public methods1,15257.89%
▷ Protected methods1075.38%
▷ Private methods73136.73%
Functions148
▷ Named functions14799.32%
▷ Anonymous functions10.68%
Constants151
▷ Global constants10166.89%
▷ Class constants5033.11%
▷ Public constants50100.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
9 PNG files occupy 0.22MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/cozy_addons_hero.png94.12KB102.52KB0.00%
admin/ct-companions/images/ct_patternberg-min.png29.19KB16.38KB▼ 43.91%
admin/ct-companions/images/ct_fotawp_screen-min.png53.99KB54.04KB0.00%
admin/ct-companions/images/ct_cozy_addons.png19.33KB9.09KB▼ 52.96%
admin/images/cozy_addons_logo.png2.19KB2.34KB0.00%