78% webdzier-companion

Code Review | Webdzier Companion

WordPress plugin Webdzier Companion scored78%from 54 tests.

About plugin

  • Plugin page: webdzier-companion
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 5, 2018
  • Latest release: Aug 16, 2023
  • Number of updates: 36
  • Update frequency: every 50.2 days
  • Top authors: webdzier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /29,358 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.56ms] Passed 4 tests

Analyzing server-side resources used by Webdzier Companion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.33 ▲2.76
Dashboard /wp-admin3.32 ▲0.0248.97 ▼3.18
Posts /wp-admin/edit.php3.37 ▲0.0150.84 ▲6.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.89 ▼9.46
Media Library /wp-admin/upload.php3.24 ▲0.0137.10 ▼0.37

Server storage [IO: ▲4.66MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/webdzier-companion/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 102 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
hg_details_page

Browser metrics Passed 4 tests

An overview of browser requirements for Webdzier Companion
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.32 ▼1.271.98 ▼0.1442.22 ▼2.44
Dashboard /wp-admin2,221 ▲185.04 ▲0.14110.47 ▲1.5541.69 ▲0.09
Posts /wp-admin/edit.php2,100 ▲32.00 ▲0.0336.53 ▼4.8833.24 ▼8.97
Add New Post /wp-admin/post-new.php1,545 ▼023.53 ▲5.19671.15 ▲50.4052.24 ▲0.45
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0997.61 ▼9.7547.36 ▲0.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • hg_details_page
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/webdzier-companion/inc/custom-controls/customizer-repeater/inc/icons.php
  • 38× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function post_type_exists() in wp-content/plugins/webdzier-companion/inc/hotel-galaxy/default-pages/slider-page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/webdzier-companion/inc/hotelgalaxy/sections/section-roomsearch.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/webdzier-companion/inc/hotelgalaxy/default-pages/room-post.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/webdzier-companion/inc/hotelgalaxy/sections/section-service.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/webdzier-companion/inc/hotelgalaxy/sections/section-above-header.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/webdzier-companion/inc/hotelgalaxy/sections/section-footerbootom.php:40
    • > PHP Fatal error
      require(): Failed opening required 'WEBDZIER_COMPANION_PLUGIN_DIR/inc/custom-controls/customizer-repeater/inc/customizer.php' (include_path='.:/usr/share/php') in wp-content/plugins/webdzier-companion/inc/custom-controls/customizer-repeater/functions.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webdzier-companion/inc/custom-controls/customizer-repeater/inc/customizer.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webdzier-companion/inc/hotelgalaxy/features/hotelgalaxy-above-header.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webdzier-companion/inc/hotel-galaxy/functions.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: team section, admin

webdzier-companion/webdzier-companion.php Passed 13 tests

The main file in "Webdzier Companion" v. 3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
55 characters long description:
Enhances webdzier themes with additional functionality.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin7,171 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PHP571,3382486,039
CSS812316682
JavaScript511459450

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity49.33
▷ Minimum class complexity5.00
▷ Maximum class complexity135.00
Average method complexity10.67
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods746.67%
▷ Protected methods00.00%
▷ Private methods853.33%
Functions113
▷ Named functions8676.11%
▷ Anonymous functions2723.89%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 1.50MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/hotelgalaxy/images/footer-logo.png19.75KB9.91KB▼ 49.82%
inc/hotel-galaxy/images/logo.png4.72KB4.73KB0.00%
inc/hotelgalaxy/images/shape2.png1.92KB1.39KB▼ 27.33%
inc/hotelgalaxy/images/about/about-1.png6.82KB6.80KB0.30%
inc/hotelgalaxy/images/about/about-text.png2.63KB2.77KB0.00%