68% wp-optinjeet

Code Review | WP OptinJeet - Create Form Lists and Manage leads

WordPress plugin WP OptinJeet - Create Form Lists and Manage leads scored68%from 54 tests.

About plugin

  • Plugin page: wp-optinjeet
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: May 6, 2020
  • Latest release: May 8, 2020
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: teknikforce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /690 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.42ms] Passed 4 tests

Server-side resources used by WP OptinJeet - Create Form Lists and Manage leads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.06 ▼2.26
Dashboard /wp-admin3.34 ▼0.0049.86 ▼15.03
Posts /wp-admin/edit.php3.45 ▲0.1055.53 ▲6.69
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.55 ▼14.52
Media Library /wp-admin/upload.php3.26 ▲0.0341.07 ▲2.12
Create Optins /wp-admin/admin.php?page=sub-createoptinJeet_Optin3.2232.77
Create SMTP Settings /wp-admin/admin.php?page=sub-optinJeet_smtp_settings3.2434.33
Create all smtp /wp-admin/admin.php?page=sub-optinJeet_createall_smtp_settings3.2130.98
Send Email /wp-admin/admin.php?page=sub-optinJeet_send_email3.2131.05
All SMTP Settings /wp-admin/admin.php?page=sub-optinJeet_all_smtppp_settings3.2434.03
PHP Email Settings /wp-admin/admin.php?page=sub-optinJeet_php_email_settings3.2133.80
Optins /wp-admin/admin.php?page=sub-optinJeet_Optin3.2435.32
History /wp-admin/admin.php?page=sub-history_Optin3.2436.79
Lists /wp-admin/admin.php?page=sub-optinJeet_list3.2434.72
WP OptinJeet /wp-admin/admin.php?page=mt-top-optinJeet-handle3.2234.38

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 95 new files
Database: 4 new tables, 6 new options
New tables
wp_optinjeet_emaillist
wp_optinjeet_smtp
wp_optinjeet_email
wp_optinjeet_phpmail
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

WP OptinJeet - Create Form Lists and Manage leads: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9314.27 ▲0.002.13 ▲0.3644.43 ▲1.87
Dashboard /wp-admin2,261 ▲845.60 ▼0.0095.81 ▲6.2538.86 ▼3.58
Posts /wp-admin/edit.php2,166 ▲632.01 ▲0.0139.92 ▼1.5835.27 ▼1.77
Add New Post /wp-admin/post-new.php1,599 ▲7323.34 ▲5.76602.77 ▼35.3548.59 ▲0.48
Media Library /wp-admin/upload.php1,463 ▲634.20 ▲0.0195.11 ▼12.7040.32 ▼2.03
Create Optins /wp-admin/admin.php?page=sub-createoptinJeet_Optin9172.2728.9457.80
Create SMTP Settings /wp-admin/admin.php?page=sub-optinJeet_smtp_settings9662.3030.9734.82
Create all smtp /wp-admin/admin.php?page=sub-optinJeet_createall_smtp_settings9692.2127.0543.09
Send Email /wp-admin/admin.php?page=sub-optinJeet_send_email1,0692.6640.3340.27
All SMTP Settings /wp-admin/admin.php?page=sub-optinJeet_all_smtppp_settings8972.2126.5339.85
PHP Email Settings /wp-admin/admin.php?page=sub-optinJeet_php_email_settings3,4062.2529.2936.96
Optins /wp-admin/admin.php?page=sub-optinJeet_Optin1,0352.4439.4341.98
History /wp-admin/admin.php?page=sub-history_Optin9542.3129.3138.75
Lists /wp-admin/admin.php?page=sub-optinJeet_list1,0382.4040.3743.70
WP OptinJeet /wp-admin/admin.php?page=mt-top-optinJeet-handle1,4582.6649.0142.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 4 tables
    • wp_optinjeet_emaillist
    • wp_optinjeet_phpmail
    • wp_optinjeet_smtp
    • wp_optinjeet_email
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mt-top-optinJeet-handle
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/adminClass.php+446
    Undefined variable: dsbld
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_createall_smtp_settings
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/form_all_smtp_settings.php+201
    Undefined variable: smtp_name
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_createall_smtp_settings
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/form_all_smtp_settings.php+209
    Undefined variable: smtp_hostname
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_createall_smtp_settings
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/form_all_smtp_settings.php+216
    Undefined variable: smtp_port
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_createall_smtp_settings
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/form_all_smtp_settings.php+223
    Undefined variable: smtp_from_email
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_createall_smtp_settings
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/form_all_smtp_settings.php+230
    Undefined variable: smtp_password
  • 494 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_php_email_settings
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/email_setting.php+113
    Undefined offset: 0
  • 492 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_php_email_settings
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/email_setting.php+113
    Trying to get property 'timezone' of non-object
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_send_email
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/send_by_email.php+162
    Undefined variable: var
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_send_email
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/send_by_email.php+162
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_send_email
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/send_by_email.php+168
    Undefined variable: mailto
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_php_email_settings
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/email_setting.php+79
    Trying to get property 'phpmail_from_email' of non-object
    • > GET request to /wp-admin/admin.php?page=sub-optinJeet_php_email_settings
    • > Notice in wp-content/plugins/wp-optinjeet/class/admin/email_setting.php+85
    Trying to get property 'phpmail_password' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-optinjeet/class/admin/savedata/savedata_smtp_mail.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-optinjeet/WP-OptinJeet.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-optinjeet/class/admin/savedata/dbsave_email.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_email() in wp-content/plugins/wp-optinjeet/class/admin/savedata/savedata_phpmail_setting.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6, #7, #8 in wp-optinjeet/assets to your readme.txt
Please take inspiration from this readme.txt

wp-optinjeet/WP-OptinJeet.php 92% from 13 tests

The principal PHP file in "WP OptinJeet - Create Form Lists and Manage leads" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-optinjeet.php" instead of "WP-OptinJeet.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 plugin36,586 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript214,6429,16418,709
CSS221,96433915,709
PHP134244222,138
JSON10022
HTML1208

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity21.50
▷ Minimum class complexity1.00
▷ Maximum class complexity101.00
Average method complexity7.07
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
datatables-1.9.4/images/sort_both.png1.11KB0.29KB▼ 74.12%
datatables-1.9.4/images/forward_disabled.png1.33KB0.58KB▼ 56.42%
datatables-1.9.4/images/back_enabled_hover.png1.34KB0.60KB▼ 55.56%
images/msmall.png2.03KB1.57KB▼ 22.51%
datatables-1.9.4/images/forward_enabled.png1.35KB0.58KB▼ 56.96%