84% avadanta-companion

Code Review | Avadanta Companion

WordPress plugin Avadanta Companion scored84%from 54 tests.

About plugin

  • Plugin page: avadanta-companion
  • Plugin version: 1.5.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 21, 2020
  • Latest release: Jul 29, 2023
  • Number of updates: 49
  • Update frequency: every 20.0 days
  • Top authors: avadantathemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

6,000+ active /110,856 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.23ms] Passed 4 tests

A check of server-side resources used by Avadanta Companion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.66 ▼10.65
Dashboard /wp-admin3.37 ▲0.0355.15 ▼7.29
Posts /wp-admin/edit.php3.42 ▲0.0749.58 ▼4.77
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.17 ▼14.21
Media Library /wp-admin/upload.php3.29 ▲0.0739.40 ▲1.23

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 194 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Avadanta Companion
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.55 ▼0.751.96 ▼0.0843.88 ▼3.65
Dashboard /wp-admin2,206 ▲215.87 ▲0.0696.19 ▼7.6738.01 ▼2.28
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0235.63 ▼3.8435.42 ▼1.38
Add New Post /wp-admin/post-new.php1,533 ▲523.19 ▲4.86666.76 ▲28.5451.84 ▼3.28
Media Library /wp-admin/upload.php1,391 ▲94.17 ▲0.0496.74 ▼1.3948.61 ▲7.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 77× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/avadanta-companion/library/vesta/home-sections/vesta-news-section.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/avadanta-companion/library/avadanta/home-sections/avadanta-callout-section.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/avadanta-companion/library/avadanta/home-sections/avadanta-portfolio-section.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avadanta-companion/library/teczilla/customizer-sections/customizer-news-section.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/avadanta-companion/library/vesta/home-sections/vesta-service-section.php:98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/avadanta-companion/library/avadanta/home-sections/avadanta-news-section.php:72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avadanta-companion/library/teczilla/customizer-sections/customizer-about-section.php:125
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/avadanta-companion/library/avadanta/home-sections/avadanta-slider-section.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avadanta-companion/library/avadanta/customizer-sections/customizer-team-section.php:122
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avadanta-companion/library/bovity/customizer-sections/customizer-slider-section.php:104

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: widget, section, widgets, avadanta

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

The main PHP file in "Avadanta Companion" ver. 1.5.9 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 219 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected10,840 lines of code in 93 files:
LanguageFilesBlank linesComment linesLines of code
PHP932,07037210,840

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions251
▷ Named functions251100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
33 compressed PNG files occupy 2.38MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
library/avadanta/assets/images/team4.png58.19KB61.69KB0.00%
library/avadanta/assets/images/avadanta-c2.png0.65KB0.66KB0.00%
library/avadanta/assets/images/client4.png1.77KB1.67KB▼ 5.69%
library/avadanta/assets/images/4.png5.01KB2.59KB▼ 48.25%
library/avadanta/assets/images/avadanta-c4.png0.56KB0.58KB0.00%