79% cozy-essential-addons

Code Review | Cozy Essential Addons

WordPress plugin Cozy Essential Addons scored79%from 54 tests.

About plugin

  • Plugin page: cozy-essential-ad...
  • Plugin version: 1.1.10
  • PHP compatiblity: 7.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Feb 23, 2022
  • Latest release: Nov 28, 2023
  • Number of updates: 24
  • Update frequency: every 26.8 days
  • Top authors: cozythemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /12,221 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▼0.62ms] Passed 4 tests

A check of server-side resources used by Cozy Essential Addons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6240.35 ▼3.48
Dashboard /wp-admin3.98 ▲0.6848.39 ▼2.88
Posts /wp-admin/edit.php4.03 ▲0.6751.22 ▲1.67
Add New Post /wp-admin/post-new.php7.14 ▲1.2598.86 ▲10.58
Media Library /wp-admin/upload.php3.84 ▲0.6138.36 ▲2.21
All Faqs /wp-admin/edit.php?post_type=cea_faq3.8844.50
Add New /wp-admin/post-new.php?post_type=cea_promotion7.1387.86
Service Categories /wp-admin/edit-tags.php?taxonomy=cea_service_category&post_type=cea_service3.8436.62
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=cea_portfolio_category&post_type=cea_portfolio3.8437.26
Add New /wp-admin/post-new.php?post_type=cea_faq7.1388.28
Faqs Categories /wp-admin/edit-tags.php?taxonomy=cea_faq_category&post_type=cea_faq3.8435.60
Add New /wp-admin/post-new.php?post_type=cea_service7.1387.47
Add New /wp-admin/post-new.php?post_type=cea_testimonial7.1387.32
Team Categories /wp-admin/edit-tags.php?taxonomy=cea_team_category&post_type=cea_team3.8440.21
Add New /wp-admin/post-new.php?post_type=cea_team7.1387.21

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 463 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cozy Essential Addons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,103 ▲34113.40 ▼1.318.33 ▲6.3640.00 ▼3.65
Dashboard /wp-admin2,408 ▲2345.66 ▼0.0392.56 ▼7.1044.78 ▲1.61
Posts /wp-admin/edit.php2,313 ▲2132.00 ▲0.0642.43 ▼0.2836.69 ▲0.54
Add New Post /wp-admin/post-new.php1,706 ▲17523.49 ▲0.52623.74 ▼75.8960.97 ▼1.27
Media Library /wp-admin/upload.php1,613 ▲2164.21 ▲0.0196.79 ▼11.1641.92 ▼5.30
All Faqs /wp-admin/edit.php?post_type=cea_faq1,2992.0736.4934.44
Add New /wp-admin/post-new.php?post_type=cea_promotion6,38322.88808.1328.09
Service Categories /wp-admin/edit-tags.php?taxonomy=cea_service_category&post_type=cea_service1,4842.3033.8835.02
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=cea_portfolio_category&post_type=cea_portfolio1,4842.3029.8733.65
Add New /wp-admin/post-new.php?post_type=cea_faq6,38122.83802.8431.50
Faqs Categories /wp-admin/edit-tags.php?taxonomy=cea_faq_category&post_type=cea_faq1,4872.3029.1737.25
Add New /wp-admin/post-new.php?post_type=cea_service6,38123.21717.4730.53
Add New /wp-admin/post-new.php?post_type=cea_testimonial1,74116.84755.3539.85
Team Categories /wp-admin/edit-tags.php?taxonomy=cea_team_category&post_type=cea_team1,4812.3029.3633.47
Add New /wp-admin/post-new.php?post_type=cea_team6,62419.97737.2535.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 80× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/cozy-essential-addons/patterns/ct-post-block.php
    • > /wp-content/plugins/cozy-essential-addons/patterns/ct-promotion-block.php
    • > /wp-content/plugins/cozy-essential-addons/patterns/ct-portfolio-full-single-row.php
    • > /wp-content/plugins/cozy-essential-addons/patterns/ct-portfolio-full-dark.php
    • > /wp-content/plugins/cozy-essential-addons/patterns/ct-footer-block.php
    • > /wp-content/plugins/cozy-essential-addons/patterns/ct-banner-with-form-layout-2.php
    • > /wp-content/plugins/cozy-essential-addons/patterns/ct-pricing-table-featured-plan.php
    • > /wp-content/plugins/cozy-essential-addons/patterns/ct-magazine-multiple-category.php
    • > /wp-content/plugins/cozy-essential-addons/patterns/ct-magazine-featured-layout.php
    • > /wp-content/plugins/cozy-essential-addons/patterns/ct-team-text-overlay.php
  • 232× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant COZY_ESSENTIAL_ADDONS_URL - assumed 'COZY_ESSENTIAL_ADDONS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-essential-addons/patterns/ha-featured-services-textcenter.php on line 13
    • > PHP Warning
      Use of undefined constant COZY_ESSENTIAL_ADDONS_URL - assumed 'COZY_ESSENTIAL_ADDONS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-essential-addons/patterns/ha-portfolio-section.php on line 14
    • > PHP Warning
      Use of undefined constant COZY_ESSENTIAL_ADDONS_URL - assumed 'COZY_ESSENTIAL_ADDONS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-essential-addons/patterns/homepage-template-store.php on line 10
    • > PHP Warning
      Use of undefined constant COZY_ESSENTIAL_ADDONS_URL - assumed 'COZY_ESSENTIAL_ADDONS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-essential-addons/patterns/ha-pricing-tables-layout-three.php on line 9
    • > PHP Warning
      Use of undefined constant COZY_ESSENTIAL_ADDONS_URL - assumed 'COZY_ESSENTIAL_ADDONS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-essential-addons/patterns/ct-banner-form-with-background-image.php on line 9
    • > PHP Warning
      Use of undefined constant COZY_ESSENTIAL_ADDONS_URL - assumed 'COZY_ESSENTIAL_ADDONS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-essential-addons/patterns/ha-portfolio-section.php on line 13
    • > PHP Warning
      Use of undefined constant COZY_ESSENTIAL_ADDONS_URL - assumed 'COZY_ESSENTIAL_ADDONS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-essential-addons/patterns/ha-featured-services-textcenter.php on line 10
    • > PHP Warning
      Use of undefined constant COZY_ESSENTIAL_ADDONS_URL - assumed 'COZY_ESSENTIAL_ADDONS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-essential-addons/patterns/homepage-template-business.php on line 16
    • > PHP Warning
      Use of undefined constant COZY_ESSENTIAL_ADDONS_URL - assumed 'COZY_ESSENTIAL_ADDONS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-essential-addons/patterns/homepage-template-webagency.php on line 14
    • > PHP Warning
      Use of undefined constant COZY_ESSENTIAL_ADDONS_URL - assumed 'COZY_ESSENTIAL_ADDONS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cozy-essential-addons/patterns/ha-testimonials-block.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: promotions, faqs, custom-post-type, services, teams...

cozy-essential-addons/cozy-essential-addons.php Passed 13 tests

The main PHP script in "Cozy Essential Addons" version 1.1.10 is automatically included on every request by WordPress
126 characters long description:
Cozy Essential Addons is the free WordPress plugin for Custom post type and provides basic skeletal for custom post type list.

Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected14,589 lines of code in 267 files:
LanguageFilesBlank linesComment linesLines of code
PHP1702,2041,44314,176
CSS5513303
JSON890089
JavaScript235614
SVG1007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods43
▷ Static methods49.30%
▷ Public methods3683.72%
▷ Protected methods00.00%
▷ Private methods716.28%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
105 compressed PNG files occupy 1.95MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/hello-agency-assets/logo_8.png2.33KB2.46KB0.00%
includes/demos/fota-agency/free/1/screenshot.png19.13KB19.98KB0.00%
includes/demos/fotawp/pro/18/screenshot.png21.89KB22.46KB0.00%
admin/images/hello-agency-assets/testimonial_1.png17.82KB18.78KB0.00%
admin/images/hello-agency-assets/logo_3.png0.38KB0.38KB0.00%