78% viral-loops-wp-integration

Code Review | Viral Loops WP Integration

WordPress plugin Viral Loops WP Integration scored78%from 54 tests.

About plugin

  • Plugin page: viral-loops-wp-in...
  • Plugin version: 3.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.0.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Jul 21, 2022
  • Number of updates: 90
  • Update frequency: every 23.1 days
  • Top authors: viralloops (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /18,590 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.48MB] [CPU: ▼16.70ms] Passed 4 tests

An overview of server-side resources used by Viral Loops WP Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2041.15 ▼5.11
Dashboard /wp-admin3.51 ▲0.2045.27 ▼3.05
Posts /wp-admin/edit.php3.62 ▲0.2645.12 ▼4.43
Add New Post /wp-admin/post-new.php3.38 ▼2.5137.12 ▼54.20
Media Library /wp-admin/upload.php3.43 ▲0.2039.39 ▲2.54

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 85 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Viral Loops WP Integration: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲12714.80 ▲0.221.64 ▼0.2038.55 ▼3.00
Dashboard /wp-admin2,278 ▲906.00 ▲1.06100.09 ▼13.6994.97 ▲52.27
Posts /wp-admin/edit.php2,158 ▲691.98 ▼0.0536.25 ▼3.7831.29 ▼3.66
Add New Post /wp-admin/post-new.php6,420 ▲4,88727.84 ▲4.50928.60 ▲191.6340.35 ▼13.87
Media Library /wp-admin/upload.php1,457 ▲694.11 ▼0.17114.96 ▲7.5045.01 ▼1.10

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/viral-loops-wp-integration/public/partials/vloops-wp-plugin-public-display.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/viral-loops-wp-integration/public/elements/vl-block/vl-block.php:62
    • > PHP Notice
      Undefined variable: campaign_type in wp-content/plugins/viral-loops-wp-integration/admin/partials/vloops-wp-plugin-scripts.php on line 40
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/viral-loops-wp-integration/public/elements/vloops-divi-extension/includes/VloopsDiviExtension.php:3
    • > PHP Notice
      Undefined variable: campaign_type in wp-content/plugins/viral-loops-wp-integration/admin/partials/vloops-wp-plugin-scripts.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/viral-loops-wp-integration/public/elements/vloops-divi-extension/includes/modules/ViralLoopsModule/ViralLoopsModule.php:3
    • > PHP Notice
      Undefined variable: campaign_type in wp-content/plugins/viral-loops-wp-integration/admin/partials/vloops-wp-plugin-scripts.php on line 33
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/viral-loops-wp-integration/public/elements/elementor-widget/elementor-widget.php:7
    • > PHP Notice
      Undefined variable: campaign_type in wp-content/plugins/viral-loops-wp-integration/admin/partials/vloops-wp-plugin-scripts.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/viral-loops-wp-integration/public/elements/vloops-divi-extension/vloops-divi-extension.php:15
    • > PHP Notice
      Undefined variable: campaign_type in wp-content/plugins/viral-loops-wp-integration/admin/partials/vloops-wp-plugin-scripts.php on line 36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: referrals, viral marketing, raffle, prelaunch campaign, giveaways...

viral-loops-wp-integration/vloops-wp-plugin.php 85% from 13 tests

The primary PHP file in "Viral Loops WP Integration" version 3.2.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: The principal plugin file should be the same as the plugin slug ("viral-loops-wp-integration.php" instead of "vloops-wp-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin39,041 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
JSON50035,819
PHP222677581,438
JavaScript1861167630
Markdown12130454
SVG303243
CSS123619227
JSX32923198
Sass22032

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity11.92
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods64
▷ Static methods23.12%
▷ Public methods5687.50%
▷ Protected methods23.12%
▷ Private methods69.38%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected