83% webriti-companion

Code Review | Webriti Companion

WordPress plugin Webriti Companion scored83%from 54 tests.

About plugin

  • Plugin page: webriti-companion
  • Plugin version: 1.9.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 29, 2017
  • Latest release: Jul 5, 2023
  • Number of updates: 80
  • Update frequency: every 25.3 days
  • Top authors: priyanshu.mittal (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

20,000+ active /452,344 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.07MB] [CPU: ▲0.35ms] Passed 4 tests

A check of server-side resources used by Webriti Companion
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0742.61 ▲4.20
Dashboard /wp-admin3.38 ▲0.0747.72 ▲0.93
Posts /wp-admin/edit.php3.49 ▲0.1348.68 ▲0.08
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.93 ▼2.51
Media Library /wp-admin/upload.php3.30 ▲0.0736.47 ▲2.91

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 386 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Webriti Companion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.74 ▲0.091.76 ▼0.0544.75 ▲0.78
Dashboard /wp-admin2,198 ▲245.51 ▼0.0187.39 ▲1.8142.02 ▼0.42
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0334.82 ▼6.9134.23 ▼3.16
Add New Post /wp-admin/post-new.php1,526 ▼1023.69 ▲5.31602.22 ▼23.9141.44 ▼35.13
Media Library /wp-admin/upload.php1,403 ▲34.28 ▲0.0994.87 ▼3.4141.83 ▼1.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 74× 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/webriti-companion/inc/rambo/customizer.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webriti-companion/inc/spasalon/features/feature-project-section.php:339
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/webriti-companion/inc/busiprof/sections/busiprof-cta-section.php:92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webriti-companion/inc/elitepress/features/feature-homecallout-section.php:107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/webriti-companion/inc/spasalon/sections/spasalon-portfolio-section.php:167
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webriti-companion/inc/wallstreet/features/feature-slider-section.php:195
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/webriti-companion/inc/spasalon/features/feature-service-section.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webriti-companion/inc/wallstreet/features/feature-service-section.php:274
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/webriti-companion/inc/appointment/webriti-starter-sites/demo-content/setup.php:130
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webriti-companion/inc/busiprof/features/feature-slider-section.php:191

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

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

The principal PHP file in "Webriti Companion" v. 1.9.3 is loaded by WordPress automatically on each request
49 characters long description:
Enhances Webriti themes with extra functionality.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected56,076 lines of code in 235 files:
LanguageFilesBlank linesComment linesLines of code
PHP1959,97618,07546,107
JavaScript113363133,621
CSS262521083,436
SVG1002,671
Markdown1680214
JSON10027

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity72.64
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes64
▷ Abstract classes23.12%
▷ Concrete classes6296.88%
▷ Final classes00.00%
Methods1,316
▷ Static methods20115.27%
▷ Public methods91969.83%
▷ Protected methods171.29%
▷ Private methods38028.88%
Functions277
▷ Named functions277100.00%
▷ Anonymous functions00.00%
Constants151
▷ Global constants10468.87%
▷ Class constants4731.13%
▷ Public constants47100.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
52 PNG files occupy 1.74MB with 0.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/busiprof.png2.93KB2.93KB0.00%
inc/wallstreet/images/service/leo-service-slide.png19.21KB8.29KB▼ 56.83%
inc/wallstreet/images/service/leo-service-default.png25.58KB10.46KB▼ 59.08%
inc/wallstreet/images/portfolio/portfolio3.png77.13KB83.42KB0.00%
inc/appointment/images/shk-service-hover.png18.42KB8.30KB▼ 54.97%