83% splash-popup-for-woocommerce

Code Review | Splash Popup for WooCommerce

WordPress plugin Splash Popup for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: splash-popup-for-...
  • Plugin version: 3.5.7.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 15, 2016
  • Latest release: Sep 21, 2023
  • Number of updates: 73
  • Update frequency: every 35.6 days
  • Top authors: dholovnia (52.05%)RazyRx (49.32%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active /10,735 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▲4.02ms] Passed 4 tests

Analyzing server-side resources used by Splash Popup for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2636.59 ▼2.82
Dashboard /wp-admin3.55 ▲0.2554.75 ▲8.94
Posts /wp-admin/edit.php3.66 ▲0.3154.02 ▲5.92
Add New Post /wp-admin/post-new.php6.13 ▲0.25104.69 ▲4.05
Media Library /wp-admin/upload.php3.47 ▲0.2544.96 ▲10.49

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 113 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
berocket_admin_notices_rate_stars
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
br-splash_popup-options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Splash Popup for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10113.26 ▼1.064.24 ▲2.5842.88 ▼9.10
Dashboard /wp-admin2,230 ▲454.92 ▼0.00104.13 ▼8.4064.81 ▲22.85
Posts /wp-admin/edit.php2,130 ▲382.15 ▲0.1538.38 ▼6.5834.64 ▼2.00
Add New Post /wp-admin/post-new.php1,549 ▲1623.28 ▼0.04700.51 ▲98.4159.27 ▲12.54
Media Library /wp-admin/upload.php1,418 ▲304.19 ▼0.03101.11 ▼1.2074.39 ▲29.16

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • berocket_admin_notices_rate_stars
    • db_upgraded
    • berocket_key_activated_plugins
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 34× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/splash-popup-for-woocommerce/berocket/templates/premium.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/splash-popup-for-woocommerce/berocket/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'BeRocket_framework_addon_lib' not found in wp-content/plugins/splash-popup-for-woocommerce/addons/deprecated_old_popup/deprecated_old_popup.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/splash-popup-for-woocommerce/main.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'BeRocket_plugin_variations' not found in wp-content/plugins/splash-popup-for-woocommerce/addons/deprecated_old_popup/popup.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/splash-popup-for-woocommerce/berocket/libraries/tippy.php:7
    • > PHP Notice
      Undefined variable: framework_version in wp-content/plugins/splash-popup-for-woocommerce/berocket/framework_version.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'BeRocket_framework_template_lib' not found in wp-content/plugins/splash-popup-for-woocommerce/style_templates/nice-blue/nice-blue.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/splash-popup-for-woocommerce/main.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/splash-popup-for-woocommerce/berocket/includes/admin_notices.php:797

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (General settings) image required
  • Donate link: Invalid URI ("httpы://berocket.com/?utm_source=wordpress_org&utm_medium=donate&utm_campaign=splash_popup")
  • Tags: You are using too many tags: 46 tag instead of maximum 10
You can take inspiration from this readme.txt

splash-popup-for-woocommerce/woocommerce-splash-popup.php 92% from 13 tests

"Splash Popup for WooCommerce" version 3.5.7.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("splash-popup-for-woocommerce.php" instead of "woocommerce-splash-popup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin21,413 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
CSS212,5957610,067
PHP464561,4579,037
JavaScript767801,835
PO File2194216430
XML20044

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity38.62
▷ Minimum class complexity1.00
▷ Maximum class complexity240.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods386
▷ Static methods14236.79%
▷ Public methods386100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
15 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
style_templates/simple-shadow/simple-shadow.png7.30KB3.84KB▼ 47.35%
berocket/assets/images/submenu-icon-a.png0.54KB0.48KB▼ 10.20%
berocket/libraries/addons/default.png3.87KB2.63KB▼ 31.94%
style_templates/nice-green/nice-green.png7.53KB3.67KB▼ 51.22%
style_templates/simple-and-nice/simple-and-nice.png9.01KB4.72KB▼ 47.62%