84% cww-companion

Code Review | CWW Companion

WordPress plugin CWW Companion scored84%from 54 tests.

About plugin

  • Plugin page: cww-companion
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.2
  • WordPress version: 6.3.1
  • First release: May 29, 2021
  • Latest release: Nov 7, 2023
  • Number of updates: 25
  • Update frequency: every 35.7 days
  • Top authors: codeworkweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /29,946 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.08ms] Passed 4 tests

This is a short check of server-side resources used by CWW Companion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.10 ▲0.18
Dashboard /wp-admin3.33 ▲0.0345.93 ▼4.04
Posts /wp-admin/edit.php3.38 ▲0.0351.66 ▲4.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0397.07 ▲1.98
Media Library /wp-admin/upload.php3.25 ▲0.0336.89 ▲1.55

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 85 new files
Database: no new tables, 8 new options
New WordPress options
elementor_onboarded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
cww_fresh_website_activate

Browser metrics Passed 4 tests

CWW Companion: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲1814.37 ▲0.021.68 ▼0.6143.58 ▼0.67
Dashboard /wp-admin2,210 ▲435.55 ▼0.0287.19 ▼26.2042.00 ▼3.69
Posts /wp-admin/edit.php2,116 ▲161.95 ▼0.0640.62 ▲3.7737.48 ▼1.21
Add New Post /wp-admin/post-new.php1,541 ▲1523.26 ▲0.03609.74 ▼106.2260.21 ▲7.23
Media Library /wp-admin/upload.php1,412 ▲124.18 ▲0.0298.71 ▼9.0942.48 ▼2.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • elementor_onboarded
    • widget_recent-posts
    • db_upgraded
    • cww_fresh_website_activate

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 20× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cww-companion/inc/customizer/cww-portfolio/home-settings/service-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cww-companion/inc/customizer/custom-controller.php:9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cww-companion/inc/importer/demo-importer/classes/importers/class-settings-importer.php on line 81
    • > PHP Warning
      Use of undefined constant CWW_COMP_PATH - assumed 'CWW_COMP_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cww-companion/inc/customizer/controllers/page-editor/customizer-page-editor.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cww-companion/inc/customizer/controllers/controller-main.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cww-companion/inc/customizer/cww-portfolio/home-settings/about-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cww-companion/cww-companion-class.php:55
    • > PHP Warning
      Use of undefined constant CWW_COMP_PATH - assumed 'CWW_COMP_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cww-companion/inc/svg-icons/svg-icons.php on line 463
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cww-companion/inc/customizer/cww-portfolio/home-settings/contact-settings.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/class-wp-customize-setting.php' (include_path='.:/usr/share/php') in wp-content/plugins/cww-companion/inc/importer/demo-importer/classes/importers/class-settings-importer.php on line 81

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: cww, cww themes, themes, companion

cww-companion/cww-companion.php 92% from 13 tests

The main file in "CWW Companion" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin17,519 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,2921,0835,207
CSS7148313,585
SVG1002,671
JavaScript106853762,530
Sass1434341,768
LESS1434441,758

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity29.84
▷ Minimum class complexity1.00
▷ Maximum class complexity214.00
Average method complexity6.22
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes15.26%
Methods105
▷ Static methods1312.38%
▷ Public methods9590.48%
▷ Protected methods32.86%
▷ Private methods76.67%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected