10% miraget-b2b-leads-generation

Code Review | Miraget B2B Leads generation

WordPress plugin Miraget B2B Leads generation scored10%from 54 tests.

About plugin

  • Plugin page: miraget-b2b-leads...
  • Plugin version: 2.3.1
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: May 2, 2018
  • Latest release: Dec 25, 2020
  • Number of updates: 53
  • Update frequency: every 18.3 days
  • Top authors: amhallam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,977 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/miraget-b2b-leads-generation/leadsgen-master.php+348
    Undefined property: stdClass::$Token

Server metrics [RAM: ▲0.24MB] [CPU: ▲4.26ms] Passed 4 tests

A check of server-side resources used by Miraget B2B Leads generation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2442.12 ▲2.18
Dashboard /wp-admin3.55 ▲0.2550.13 ▲2.21
Posts /wp-admin/edit.php3.66 ▲0.3148.95 ▲2.78
Add New Post /wp-admin/post-new.php6.13 ▲0.2496.36 ▲13.41
Media Library /wp-admin/upload.php3.47 ▲0.2442.78 ▲9.85
company history /wp-admin/admin.php?page=company_history3.4132.64
MostVisistPage history /wp-admin/admin.php?page=MostVisistPage_history3.4132.66
ActiveCompany history /wp-admin/admin.php?page=ActiveCompany_history3.4129.30
Analytics history /wp-admin/admin.php?page=Analytics_history3.4132.26

Server storage [IO: ▲0.24MB] [DB: ▲0.73MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 265 new files
Database: 1 new table, 6 new options
New tables
wp_miragetgen_opt
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Miraget B2B Leads generation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲11713.24 ▼1.203.01 ▲1.0544.11 ▼5.33
Dashboard /wp-admin2,212 ▲574.98 ▼0.64112.03 ▲2.9993.27 ▲51.06
Posts /wp-admin/edit.php2,114 ▲282.06 ▲0.0741.76 ▲6.2035.91 ▲2.98
Add New Post /wp-admin/post-new.php1,687 ▲14922.64 ▼0.83644.50 ▼5.9251.66 ▼6.47
Media Library /wp-admin/upload.php1,413 ▲254.20 ▼0.09102.52 ▲3.6350.63 ▲7.00
company history /wp-admin/admin.php?page=company_history8251.7729.2027.15
MostVisistPage history /wp-admin/admin.php?page=MostVisistPage_history9752.1128.4232.42
ActiveCompany history /wp-admin/admin.php?page=ActiveCompany_history9662.1328.7729.71
Analytics history /wp-admin/admin.php?page=Analytics_history9553.4177.0730.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.73MB] 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
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Analytics_history
    • > Notice in wp-content/plugins/miraget-b2b-leads-generation/includes/functions.php+342
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Analytics_history
    • > Notice in wp-content/plugins/miraget-b2b-leads-generation/includes/functions.php+348
    Undefined offset: 2
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Analytics_history
    • > Notice in wp-content/plugins/miraget-b2b-leads-generation/includes/functions.php+351
    Undefined offset: 3
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ActiveCompany_history
    • > Notice in wp-content/plugins/miraget-b2b-leads-generation/includes/functions.php+354
    Undefined offset: 4
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Analytics_history
    • > Notice in wp-content/plugins/miraget-b2b-leads-generation/includes/functions.php+345
    Undefined offset: 1

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #0, #0, #0, #0, #0 in miraget-b2b-leads-generation/assets to your readme.txt
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

miraget-b2b-leads-generation/leadsgen-master.php 85% from 13 tests

The entry point to "Miraget B2B Leads generation" version 2.3.1 is a PHP file that has certain tags in its header comment area
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 ("miraget-b2b-leads-generation.php" instead of "leadsgen-master.php")
  • Description: The description should be shorter than 140 characters (currently 285 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin2,199 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP84393631,580
CSS15421550
JavaScript324169

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.20
▷ Minimum class complexity4.00
▷ Maximum class complexity16.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods49
▷ Static methods1632.65%
▷ Public methods4795.92%
▷ Protected methods00.00%
▷ Private methods24.08%
Functions30
▷ Named functions2893.33%
▷ Anonymous functions26.67%
Constants6
▷ Global constants6100.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
251 PNG files occupy 0.13MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/country/ki_16.png0.48KB0.49KB0.00%
image/country/ro_16.png0.29KB0.24KB▼ 17.35%
image/country/de_16.png0.23KB0.19KB▼ 16.17%
image/country/bh_16.png0.25KB0.16KB▼ 35.77%
image/country/lv_16.png0.23KB0.17KB▼ 28.09%