83% reward-dice-by-precisefunnels

Code Review | Reward Dice by PreciseFunnels - WooCommerce Exit Intent Popup with an Email Optin Form

WordPress plugin Reward Dice by PreciseFunnels - WooCommerce Exit Intent Popup with an Email Optin Form scored83%from 54 tests.

About plugin

  • Plugin page: reward-dice-by-pr...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 6.3.1
  • First release: Jul 28, 2021
  • Latest release: Oct 17, 2021
  • Number of updates: 9
  • Update frequency: every 9.0 days
  • Top authors: roksprogar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /488 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.17ms] Passed 4 tests

An overview of server-side resources used by Reward Dice by PreciseFunnels - WooCommerce Exit Intent Popup with an Email Optin Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.51 ▼8.74
Dashboard /wp-admin3.38 ▲0.0344.15 ▼16.25
Posts /wp-admin/edit.php3.43 ▲0.0748.17 ▼2.77
Add New Post /wp-admin/post-new.php5.94 ▲0.0579.78 ▼12.90
Media Library /wp-admin/upload.php3.30 ▲0.0732.92 ▲0.26

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
reward_dice_settings
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Reward Dice by PreciseFunnels - WooCommerce Exit Intent Popup with an Email Optin Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,027 ▲29213.64 ▼0.751.48 ▼0.4041.85 ▼1.42
Dashboard /wp-admin2,437 ▲2494.84 ▼1.07107.20 ▼7.0637.90 ▼10.01
Posts /wp-admin/edit.php2,319 ▲2302.09 ▲0.0842.21 ▲5.0434.08 ▼1.68
Add New Post /wp-admin/post-new.php1,551 ▲1823.09 ▼0.02652.12 ▼9.1364.35 ▲12.16
Media Library /wp-admin/upload.php1,615 ▲2274.25 ▲0.0696.86 ▲1.1442.34 ▼1.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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)
Everything seems fine, however 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
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/reward-dice-by-precisefunnels/templates/admin/settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reward-dice-by-precisefunnels/includes/reward-dice-settings-fields.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reward-dice-by-precisefunnels/includes/reward-dice-menus.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: woocommerce, exit intent, popup, precisefunnels, email optin

reward-dice-by-precisefunnels/reward-dice.php 69% from 13 tests

The main file in "Reward Dice by PreciseFunnels - WooCommerce Exit Intent Popup with an Email Optin Form" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("reward-dice-by-precisefunnels.php" instead of "reward-dice.php")
  • Domain Path: The domain path folder does not exist ("/languages")

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
Everything looks great! No dangerous files found in this plugin182 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP62927163
JavaScript10019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin