78% hoo-companion

Code Review | Hoo Companion

WordPress plugin Hoo Companion scored78%from 54 tests.

About plugin

  • Plugin page: hoo-companion
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Jul 31, 2018
  • Latest release: Oct 21, 2018
  • Number of updates: 7
  • Update frequency: every 11.7 days
  • Top authors: hoosoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /8,832 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲1.14MB] [CPU: ▲2.78ms] Passed 4 tests

Analyzing server-side resources used by Hoo Companion
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.9045.39 ▲1.96
Dashboard /wp-admin4.54 ▲1.2456.22 ▲5.67
Posts /wp-admin/edit.php4.60 ▲1.2457.80 ▲9.13
Add New Post /wp-admin/post-new.php7.36 ▲1.4799.03 ▼0.64
Media Library /wp-admin/upload.php4.40 ▲1.1743.95 ▲4.13

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

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

Browser metrics Passed 4 tests

Hoo Companion: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▼0.022.36 ▲0.6347.35 ▲4.93
Dashboard /wp-admin2,198 ▲215.58 ▼0.1483.40 ▼7.6940.75 ▼2.78
Posts /wp-admin/edit.php2,129 ▲262.20 ▲0.1744.51 ▲6.5934.10 ▼0.91
Add New Post /wp-admin/post-new.php6,901 ▲5,37526.37 ▲3.24895.07 ▲193.1945.80 ▼7.74
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.0598.11 ▼7.3442.93 ▼4.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • 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
Good news, no errors were detected

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
  • 30× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/hoo-companion/includes/metabox/butterbean/tmpl/control-checkboxes.php
    • > /wp-content/plugins/hoo-companion/includes/metabox/butterbean/tmpl/control-parent.php
    • > /wp-content/plugins/hoo-companion/hoo-companion.php
    • > /wp-content/plugins/hoo-companion/includes/metabox/butterbean/tmpl/control-select-group.php
    • > /wp-content/plugins/hoo-companion/includes/metabox/butterbean/tmpl/control-checkbox.php
    • > /wp-content/plugins/hoo-companion/includes/metabox/butterbean/tmpl/section.php
    • > /wp-content/plugins/hoo-companion/includes/metabox/butterbean/tmpl/control-color.php
    • > /wp-content/plugins/hoo-companion/includes/metabox/butterbean/tmpl/control-textarea.php
    • > /wp-content/plugins/hoo-companion/includes/metabox/controls/image/template.php
    • > /wp-content/plugins/hoo-companion/includes/metabox/controls/select/template.php
  • 48× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control_Radio' not found in wp-content/plugins/hoo-companion/includes/metabox/butterbean/inc/controls/class-control-radio-image.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/hoo-companion/includes/metabox/butterbean/inc/controls/class-control-textarea.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hoo-companion/includes/widgets/govideo/widget-header-slider.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/hoo-companion/includes/metabox/butterbean/inc/controls/class-control-color.php:20
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/hoo-companion/includes/importer/wordpress-importer.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/hoo-companion/includes/metabox/controls/editor/class-control-editor.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hoo-companion/includes/widgets/singlepage/widget-base-section.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/hoo-companion/includes/metabox/butterbean/inc/controls/class-control-multi-avatars.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hoo-companion/includes/widgets/widget-featured-slider.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hoo-companion/includes/widgets/govideo/widget-section.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: page options

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

The main file in "Hoo Companion" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected15,583 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
PHP882,7334,5878,263
JavaScript141,6958065,985
CSS915024934
Markdown41260401

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity22.55
▷ Minimum class complexity1.00
▷ Maximum class complexity263.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes58
▷ Abstract classes00.00%
▷ Concrete classes58100.00%
▷ Final classes23.45%
Methods439
▷ Static methods265.92%
▷ Public methods37785.88%
▷ Protected methods357.97%
▷ Private methods276.15%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants880.00%
▷ Class constants220.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin