10% gamification-email-collector-mikehit

Code Review | Popup Lead - Optin Email Marketing Tool for WooCommerce and Wordpress

WordPress plugin Popup Lead - Optin Email Marketing Tool for WooCommerce and Wordpress scored10%from 54 tests.

About plugin

  • Plugin page: gamification-emai...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 6.3.1
  • First release: Dec 23, 2020
  • Latest release: Mar 24, 2021
  • Number of updates: 16
  • Update frequency: every 5.8 days
  • Top authors: mikehit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /442 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Error in wp-content/plugins/gamification-email-collector-mikehit/includes/class-mikehit-plugin.php+154
    Uncaught Error: Class 'Mikehit_Admin_Settings' not found in wp-content/plugins/gamification-email-collector-mikehit/includes/class-mikehit-plugin.php:154
    Stack trace:
    #0 wp-content/plugins/gamification-email-collector-mikehit/includes/class-mikehit-plugin.php(75): Mikehit_Plugin->define_admin_hooks()
    #1 wp-content/plugins/gamification-email-collector-mikehit/mikehit-plugin.php(72): Mikehit_Plugin->__construct()
    #2 wp-content/plugins/gamification-email-collector-mikehit/mikehit-plugin.php(76): run_mikehit_plugin()
    #3 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #4 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▼0.01MB] [CPU: ▼12.75ms] Passed 4 tests

Analyzing server-side resources used by Popup Lead - Optin Email Marketing Tool for WooCommerce and Wordpress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.38 ▼9.18
Dashboard /wp-admin3.31 ▼0.0448.02 ▼21.63
Posts /wp-admin/edit.php3.36 ▲0.0048.69 ▼0.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.49 ▼19.91
Media Library /wp-admin/upload.php3.23 ▲0.0036.70 ▲1.49

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Popup Lead - Optin Email Marketing Tool for WooCommerce and Wordpress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.83 ▲0.211.78 ▼0.0641.24 ▼2.88
Dashboard /wp-admin2,206 ▲185.91 ▲0.05110.43 ▼8.7842.82 ▲0.24
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0539.92 ▲3.5936.29 ▲2.08
Add New Post /wp-admin/post-new.php1,514 ▼517.51 ▼5.54678.68 ▲17.9764.21 ▲6.95
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.01103.31 ▼2.7949.58 ▲3.30

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/gamification-email-collector-mikehit/admin/partials/mikehit-plugin-admin-display.php
    • > /wp-content/plugins/gamification-email-collector-mikehit/public/partials/mikehit-plugin-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: Please take inspiration from this readme.txt

gamification-email-collector-mikehit/mikehit-plugin.php 77% from 13 tests

"Popup Lead - Optin Email Marketing Tool for WooCommerce and Wordpress" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 230 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gamification-email-collector-mikehit.php" instead of "mikehit-plugin.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin487 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13205643445
PO File1111136
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.12
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods44
▷ Static methods24.55%
▷ Public methods3886.36%
▷ Protected methods00.00%
▷ Private methods613.64%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin